diff options
author | Brad King <brad.king@kitware.com> | 2020-09-22 16:57:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-23 13:25:42 (GMT) |
commit | f2daa025e3bf05f89a745e6a65fea9537e0a035d (patch) | |
tree | 2e7528043c7ee905e3777e53e11698f8b81a9a57 /Help/command/get_directory_property.rst | |
parent | 0cb7216b9f016d5749209227502e499b53b33841 (diff) | |
download | CMake-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.rst | 7 |
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, |