diff options
author | Brad King <brad.king@kitware.com> | 2019-09-26 18:47:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-26 18:58:26 (GMT) |
commit | cf01d3d2bd649ab1157641b3212a360b06db747f (patch) | |
tree | 0bbeed9725d861e441a701d937fbbec6c3da446f /Tests/RunCMake/add_subdirectory/ExcludeFromAll | |
parent | 21442d72a44c2bd732f2ff19ed89ce488854d25d (diff) | |
download | CMake-cf01d3d2bd649ab1157641b3212a360b06db747f.zip CMake-cf01d3d2bd649ab1157641b3212a360b06db747f.tar.gz CMake-cf01d3d2bd649ab1157641b3212a360b06db747f.tar.bz2 |
Tests: Clarify target names in RunCMake.add_subdirectory ExcludeFromAll
Rename the `baz` target to `subinc` to clarify that its role is to be
included even though it is in an otherwise excluded subdirectory.
Diffstat (limited to 'Tests/RunCMake/add_subdirectory/ExcludeFromAll')
3 files changed, 8 insertions, 5 deletions
diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt index 99add23..9d7922f 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/CMakeLists.txt @@ -1,8 +1,7 @@ add_library(bar STATIC bar.cpp) add_library(foo STATIC foo.cpp) - -add_library(baz STATIC foo.cpp) -set_target_properties(baz PROPERTIES EXCLUDE_FROM_ALL OFF) - target_include_directories(foo PUBLIC .) + +add_library(subinc STATIC subinc.cpp) +set_target_properties(subinc PROPERTIES EXCLUDE_FROM_ALL OFF) diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake index 2a0179e..56a8abd 100644 --- a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/check.cmake @@ -6,7 +6,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake) foreach(file "${foo_lib}" - "${baz_lib}" + "${subinc_lib}" "${main_exe}" ) if(NOT EXISTS "${file}") diff --git a/Tests/RunCMake/add_subdirectory/ExcludeFromAll/subinc.cpp b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/subinc.cpp new file mode 100644 index 0000000..e9faacd --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/ExcludeFromAll/subinc.cpp @@ -0,0 +1,4 @@ +int subinc() +{ + return 0; +} |