From 8a15e75fe351579314f92dd9d9e2c6faeac5ad71 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 26 Sep 2019 11:47:14 -0400 Subject: Tests: Cover EXCLUDE_FROM_ALL OFF on sub/sub/tgt in sub/all Issue: #19753 --- Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake | 1 + Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt | 2 ++ Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake | 1 + Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake | 1 + 4 files changed, 5 insertions(+) diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake index fbcfe7b..57ab938 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake @@ -12,4 +12,5 @@ set(bar_lib \"$\") set(zot_lib \"$\") set(subinc_lib \"$\") set(subsub_lib \"$\") +set(subsubinc_lib \"$\") ") diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt index 14f7973..ec28275 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/SubSub/CMakeLists.txt @@ -1 +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/check-sub.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check-sub.cmake index afacf6e..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 diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake index b229f4c..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. -- cgit v0.12