summaryrefslogtreecommitdiffstats
path: root/Help/command/get_directory_property.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-22 16:57:50 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-23 13:25:42 (GMT)
commitf2daa025e3bf05f89a745e6a65fea9537e0a035d (patch)
tree2e7528043c7ee905e3777e53e11698f8b81a9a57 /Help/command/get_directory_property.rst
parent0cb7216b9f016d5749209227502e499b53b33841 (diff)
downloadCMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.zip
CMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.tar.gz
CMake-f2daa025e3bf05f89a745e6a65fea9537e0a035d.tar.bz2
{get,set}_property: Add support for referencing binary directories
Index directories by their binary directory path in addition to their source directory path. Fixes: #19262
Diffstat (limited to 'Help/command/get_directory_property.rst')
-rw-r--r--Help/command/get_directory_property.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Help/command/get_directory_property.rst b/Help/command/get_directory_property.rst
index 218efa9..39015cc 100644
--- a/Help/command/get_directory_property.rst
+++ b/Help/command/get_directory_property.rst
@@ -8,9 +8,14 @@ Get a property of ``DIRECTORY`` scope.
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.
+It may reference either a source directory, or since CMake 3.19,
+a binary directory. Relative paths are treated as relative to the
+current source directory. CMake must already know about the directory,
+either by having added it through a call to :command:`add_subdirectory`
+or being the top level directory.
If the property is not defined for the nominated directory scope,
an empty string is returned. In the case of ``INHERITED`` properties,