diff options
author | Brad King <brad.king@kitware.com> | 2016-09-19 17:33:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-19 18:00:32 (GMT) |
commit | cbca65826c2bf49ba8c99efe8fa315d2942c4836 (patch) | |
tree | 4bed2266fce217dc80081de750b3eae7401a0eeb /Tests/RunCMake/get_property | |
parent | 7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4 (diff) | |
download | CMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.zip CMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.tar.gz CMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.tar.bz2 |
Add directory property to list buildsystem targets
Add a BUILDSYSTEM_TARGETS property to allow project code to traverse
the list of its own targets in a given directory.
Diffstat (limited to 'Tests/RunCMake/get_property')
3 files changed, 15 insertions, 1 deletions
diff --git a/Tests/RunCMake/get_property/directory_properties-stderr.txt b/Tests/RunCMake/get_property/directory_properties-stderr.txt index b24c709..5fb79e1 100644 --- a/Tests/RunCMake/get_property/directory_properties-stderr.txt +++ b/Tests/RunCMake/get_property/directory_properties-stderr.txt @@ -7,4 +7,8 @@ get_property: --><-- get_directory_property: -->[^<;]*Tests/RunCMake/get_property/directory_properties<-- get_property: -->[^<;]*Tests/RunCMake/get_property/directory_properties<-- get_directory_property: -->[^<;]*Tests/RunCMake/get_property/directory_properties/sub1;[^<;]*Tests/RunCMake/get_property/directory_properties/sub2<-- -get_property: -->[^<;]*Tests/RunCMake/get_property/directory_properties/sub1;[^<;]*Tests/RunCMake/get_property/directory_properties/sub2<--$ +get_property: -->[^<;]*Tests/RunCMake/get_property/directory_properties/sub1;[^<;]*Tests/RunCMake/get_property/directory_properties/sub2<-- +get_directory_property: -->CustomTop;InterfaceTop<-- +get_property: -->CustomTop;InterfaceTop<-- +get_directory_property: -->CustomSub;InterfaceSub<-- +get_property: -->CustomSub;InterfaceSub<--$ diff --git a/Tests/RunCMake/get_property/directory_properties.cmake b/Tests/RunCMake/get_property/directory_properties.cmake index c1347d3..ae57282 100644 --- a/Tests/RunCMake/get_property/directory_properties.cmake +++ b/Tests/RunCMake/get_property/directory_properties.cmake @@ -14,6 +14,12 @@ check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" empty) check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" custom) check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" noexist) +add_custom_target(CustomTop) +add_library(InterfaceTop INTERFACE) +add_library(my::InterfaceTop ALIAS InterfaceTop) + add_subdirectory(directory_properties) check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SUBDIRECTORIES) check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" SUBDIRECTORIES) +check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BUILDSYSTEM_TARGETS) +check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" BUILDSYSTEM_TARGETS) diff --git a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt index f9ebf78..7318b97 100644 --- a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt +++ b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt @@ -1,2 +1,6 @@ add_subdirectory(sub1) subdirs(sub2) + +add_custom_target(CustomSub) +add_library(InterfaceSub INTERFACE) +add_library(my::InterfaceSub ALIAS InterfaceSub) |