CMake/Help/prop_dir/SUBDIRECTORIES.rst
Brad King 7a4b8d0dc2 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.
2016-09-19 13:59:43 -04:00

16 lines
615 B
ReStructuredText

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.