This commit is contained in:
2022-10-19 16:58:22 +03:00
parent c32b2a85cc
commit dae5cc0afe
11 changed files with 16 additions and 40 deletions

View File

@@ -1,29 +0,0 @@
include_guard(GLOBAL)
# Пропуск целей, которые создаются автоматически в `CMAKE_BINARY_DIR`
macro(myx_skip_external_target TARGET_NAME)
get_target_property(__s1 ${TARGET_NAME} INTERFACE_SOURCES)
if(__s1)
list(APPEND __sources ${__s1})
endif()
get_target_property(__s2 ${TARGET_NAME} SOURCES)
if(__s2)
list(APPEND __sources ${__s2})
endif()
foreach(__iter ${__sources})
string(FIND ${__iter} ${CMAKE_BINARY_DIR} __pos)
if(__pos GREATER -1)
unset(__type)
unset(__pos)
unset(__sources)
return()
endif()
endforeach()
unset(__iter)
unset(__type)
unset(__pos)
unset(__sources)
unset(__s2)
unset(__s1)
endmacro(myx_skip_external_target TARGET_NAME)