summaryrefslogtreecommitdiffstats
path: root/Help/prop_dir
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/prop_dir
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/prop_dir')
-rw-r--r--Help/prop_dir/SUBDIRECTORIES.rst15
1 files changed, 15 insertions, 0 deletions
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.