diff options
Diffstat (limited to 'Tests/RunCMake')
6 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake index ff676a6..57ab938 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake @@ -11,4 +11,6 @@ set(foo_lib \"$<TARGET_FILE:foo>\") set(bar_lib \"$<TARGET_FILE:bar>\") set(zot_lib \"$<TARGET_FILE:zot>\") set(subinc_lib \"$<TARGET_FILE:subinc>\") +set(subsub_lib \"$<TARGET_FILE:subsub>\") +set(subsubinc_lib \"$<TARGET_FILE:subsubinc>\") ") diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt index 790da54..9ed9e55 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt @@ -1,5 +1,7 @@ project(ExcludeFromAllSub NONE) +add_subdirectory(SubSub EXCLUDE_FROM_ALL) + add_library(bar STATIC EXCLUDE_FROM_ALL bar.cpp) add_library(zot STATIC zot.cpp) diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt new file mode 100644 index 0000000..ec28275 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(subsub STATIC subsub.cpp) +add_library(subsubinc STATIC subsub.cpp) +set_property(TARGET subsubinc PROPERTY EXCLUDE_FROM_ALL OFF) diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/subsub.cpp b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/subsub.cpp new file mode 100644 index 0000000..ca689ed --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/subsub.cpp @@ -0,0 +1,4 @@ +int subsub() +{ + return 0; +} diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake index 297ad1e..d318c10 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake @@ -8,6 +8,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake) "${foo_lib}" "${subinc_lib}" "${zot_lib}" + "${subsubinc_lib}" ) if(NOT EXISTS "${file}") set(RunCMake_TEST_FAILED @@ -18,6 +19,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake) foreach(file "${main_exe}" "${bar_lib}" + "${subsub_lib}" ) if(EXISTS "${file}") set(RunCMake_TEST_FAILED diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake index 433c032..d4bdef2 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake @@ -8,6 +8,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake) "${foo_lib}" "${subinc_lib}" "${main_exe}" + "${subsubinc_lib}" ) if(EXISTS "${file}") # Remove for next step of test. @@ -21,6 +22,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake) foreach(file "${zot_lib}" "${bar_lib}" + "${subsub_lib}" ) if(EXISTS "${file}") set(RunCMake_TEST_FAILED |