summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-20 12:41:01 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-20 12:41:01 (GMT)
commit6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b (patch)
tree6754e589fede866991a21c94b896a50e9c156e54 /Tests
parent5c1ebec8430fe755f9ef2b0ba3316f424113ecbf (diff)
parentd0be1e15c383f17502d0f47a36d16ba3571b0b79 (diff)
downloadCMake-6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b.zip
CMake-6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b.tar.gz
CMake-6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b.tar.bz2
Merge topic 'directory-list-targets-and-subdirs'
d0be1e15 Add directory properties to get source and binary directories cbca6582 Add directory property to list buildsystem targets 7a4b8d0d Add a directory property to list subdirectories 089868a2 cmState: Record buildsystem target names in each directory
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/get_property/directory_properties-stderr.txt18
-rw-r--r--Tests/RunCMake/get_property/directory_properties.cmake15
-rw-r--r--Tests/RunCMake/get_property/directory_properties/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/get_property/directory_properties/sub1/CMakeLists.txt0
-rw-r--r--Tests/RunCMake/get_property/directory_properties/sub2/CMakeLists.txt0
5 files changed, 38 insertions, 1 deletions
diff --git a/Tests/RunCMake/get_property/directory_properties-stderr.txt b/Tests/RunCMake/get_property/directory_properties-stderr.txt
index 80c9877..6d5bcdb 100644
--- a/Tests/RunCMake/get_property/directory_properties-stderr.txt
+++ b/Tests/RunCMake/get_property/directory_properties-stderr.txt
@@ -3,4 +3,20 @@ get_property: --><--
get_directory_property: -->value<--
get_property: -->value<--
get_directory_property: --><--
-get_property: --><--$
+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_directory_property: -->CustomTop;InterfaceTop<--
+get_property: -->CustomTop;InterfaceTop<--
+get_directory_property: -->CustomSub;InterfaceSub<--
+get_property: -->CustomSub;InterfaceSub<--
+get_directory_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
+get_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build<--
+get_directory_property: -->[^<;]*/RunCMake/get_property<--
+get_property: -->[^<;]*/Tests/RunCMake/get_property<--
+get_directory_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build/directory_properties<--
+get_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties-build/directory_properties<--
+get_directory_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties<--
+get_property: -->[^<;]*/Tests/RunCMake/get_property/directory_properties<--$
diff --git a/Tests/RunCMake/get_property/directory_properties.cmake b/Tests/RunCMake/get_property/directory_properties.cmake
index b0a9b1b..4e68738 100644
--- a/Tests/RunCMake/get_property/directory_properties.cmake
+++ b/Tests/RunCMake/get_property/directory_properties.cmake
@@ -13,3 +13,18 @@ set_directory_properties(PROPERTIES empty "" custom value)
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)
+
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" BINARY_DIR)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SOURCE_DIR)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" BINARY_DIR)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" SOURCE_DIR)
diff --git a/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
new file mode 100644
index 0000000..7318b97
--- /dev/null
+++ b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(sub1)
+subdirs(sub2)
+
+add_custom_target(CustomSub)
+add_library(InterfaceSub INTERFACE)
+add_library(my::InterfaceSub ALIAS InterfaceSub)
diff --git a/Tests/RunCMake/get_property/directory_properties/sub1/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/sub1/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/get_property/directory_properties/sub1/CMakeLists.txt
diff --git a/Tests/RunCMake/get_property/directory_properties/sub2/CMakeLists.txt b/Tests/RunCMake/get_property/directory_properties/sub2/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/get_property/directory_properties/sub2/CMakeLists.txt