summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_property
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-19 17:32:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-19 17:59:43 (GMT)
commit7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4 (patch)
tree5e94735e2609b79245312e3afe9070b03b8fa284 /Tests/RunCMake/get_property
parent089868a244e623f75c1ffbe9297d3228bef9a8f1 (diff)
downloadCMake-7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4.zip
CMake-7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4.tar.gz
CMake-7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4.tar.bz2
Add a directory property to list subdirectories
Add a SUBDIRECTORIES directory property to allow project code to traverse the directory structure of itself as CMake sees it.
Diffstat (limited to 'Tests/RunCMake/get_property')
-rw-r--r--Tests/RunCMake/get_property/directory_properties-stderr.txt6
-rw-r--r--Tests/RunCMake/get_property/directory_properties.cmake4
-rw-r--r--Tests/RunCMake/get_property/directory_properties/CMakeLists.txt2
-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, 11 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..b24c709 100644
--- a/Tests/RunCMake/get_property/directory_properties-stderr.txt
+++ b/Tests/RunCMake/get_property/directory_properties-stderr.txt
@@ -3,4 +3,8 @@ 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<--$
diff --git a/Tests/RunCMake/get_property/directory_properties.cmake b/Tests/RunCMake/get_property/directory_properties.cmake
index b0a9b1b..c1347d3 100644
--- a/Tests/RunCMake/get_property/directory_properties.cmake
+++ b/Tests/RunCMake/get_property/directory_properties.cmake
@@ -13,3 +13,7 @@ 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_subdirectory(directory_properties)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" SUBDIRECTORIES)
+check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}/directory_properties" SUBDIRECTORIES)
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..f9ebf78
--- /dev/null
+++ b/Tests/RunCMake/get_property/directory_properties/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(sub1)
+subdirs(sub2)
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