mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-24 21:19:12 +08:00

Revise docs for all "Scripting Commands", except four find_XXX that use a macro suite of their own. * Take full advantage of the improved syntax highlighting. * Make consequential use of <..> placeholders. * Clarify things here and there in the text. Specific improvements to some command docs: * "math": Correct description of novel hexadecimal capability. * "if", "foreach", "while": Provide link to "endif" etc * "foreach", "while": Mention "break" and "continue". * "foreach": Simplify explanation of ``RANGE`` and ``IN`` signatures; advise against negative arguments or reverse ranges (compare issue #18461) * "endif", "endfunction" etc: Explain that the argument is optional and maintained for compatibility only
30 lines
1.0 KiB
ReStructuredText
30 lines
1.0 KiB
ReStructuredText
get_directory_property
|
|
----------------------
|
|
|
|
Get a property of ``DIRECTORY`` scope.
|
|
|
|
.. code-block:: cmake
|
|
|
|
get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)
|
|
|
|
Stores a property of directory scope in the named ``<variable>``.
|
|
The ``DIRECTORY`` argument specifies another directory from which
|
|
to retrieve the property value instead of the current directory.
|
|
The specified directory must have already been traversed by CMake.
|
|
|
|
If the property is not defined for the nominated directory scope,
|
|
an empty string is returned. In the case of ``INHERITED`` properties,
|
|
if the property is not found for the nominated directory scope,
|
|
the search will chain to a parent scope as described for the
|
|
:command:`define_property` command.
|
|
|
|
.. code-block:: cmake
|
|
|
|
get_directory_property(<variable> [DIRECTORY <dir>]
|
|
DEFINITION <var-name>)
|
|
|
|
Get a variable definition from a directory. This form is useful to
|
|
get a variable definition from another directory.
|
|
|
|
See also the more general :command:`get_property` command.
|