2.0.9
This commit is contained in:
14
MyxCMake/lib/macro/SkipExternalTarget.cmake
Normal file
14
MyxCMake/lib/macro/SkipExternalTarget.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
# Пропуск целей, которые создаются автоматически в `CMAKE_BINARY_DIR`
|
||||
macro(myx_skip_external_target NAME)
|
||||
get_target_property(__source_dir ${NAME} SOURCE_DIR)
|
||||
string(FIND ${__source_dir} ${CMAKE_BINARY_DIR} __pos)
|
||||
if(__pos EQUAL 0)
|
||||
unset(__pos)
|
||||
unset(__source_dir)
|
||||
return()
|
||||
endif()
|
||||
unset(__pos)
|
||||
unset(__source_dir)
|
||||
endmacro(myx_skip_external_target NAME)
|
Reference in New Issue
Block a user