summaryrefslogtreecommitdiffstats
path: root/Help
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 /Help
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 'Help')
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_dir/SUBDIRECTORIES.rst15
-rw-r--r--Help/release/dev/directory-list-targets-and-subdirs.rst5
3 files changed, 21 insertions, 0 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 0f1bfad..855cee6 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -73,6 +73,7 @@ Properties on Directories
/prop_dir/RULE_LAUNCH_COMPILE
/prop_dir/RULE_LAUNCH_CUSTOM
/prop_dir/RULE_LAUNCH_LINK
+ /prop_dir/SUBDIRECTORIES
/prop_dir/TEST_INCLUDE_FILE
/prop_dir/VARIABLES
/prop_dir/VS_GLOBAL_SECTION_POST_section
diff --git a/Help/prop_dir/SUBDIRECTORIES.rst b/Help/prop_dir/SUBDIRECTORIES.rst
new file mode 100644
index 0000000..2c2ea77
--- /dev/null
+++ b/Help/prop_dir/SUBDIRECTORIES.rst
@@ -0,0 +1,15 @@
+SUBDIRECTORIES
+--------------
+
+This read-only directory property contains a
+:ref:`;-list <CMake Language Lists>` of subdirectories processed so far by
+the :command:`add_subdirectory` or :command:`subdirs` commands. Each entry is
+the absolute path to the source directory (containing the ``CMakeLists.txt``
+file). This is suitable to pass to the :command:`get_property` command
+``DIRECTORY`` option.
+
+.. note::
+
+ The :command:`subdirs` command does not process its arguments until
+ after the calling directory is fully processed. Therefore looking
+ up this property in the current directory will not see them.
diff --git a/Help/release/dev/directory-list-targets-and-subdirs.rst b/Help/release/dev/directory-list-targets-and-subdirs.rst
new file mode 100644
index 0000000..554d6d6
--- /dev/null
+++ b/Help/release/dev/directory-list-targets-and-subdirs.rst
@@ -0,0 +1,5 @@
+directory-list-targets-and-subdirs
+----------------------------------
+
+* A :prop_dir:`SUBDIRECTORIES` directory property was added to
+ get the list of subdirectories added by a project in a directory.