summaryrefslogtreecommitdiffstats
path: root/Help/command/get_source_file_property.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-01-05 06:33:07 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-01-05 06:40:16 (GMT)
commit8086badba452829beb7d87499f212edf9e51b7af (patch)
tree01c5cf4f57ff1b02fb079c9106cd927aad0814c6 /Help/command/get_source_file_property.rst
parent1ca5ec67b048c29b86eb96e2097b4886ce045b7a (diff)
downloadCMake-8086badba452829beb7d87499f212edf9e51b7af.zip
CMake-8086badba452829beb7d87499f212edf9e51b7af.tar.gz
CMake-8086badba452829beb7d87499f212edf9e51b7af.tar.bz2
Help: Fix wrong return values for unset inherited properties
Since ff6234509e (Help: Clarify behavior of INHERITED properties, 2018-03-21), the docs for some get_..._property() commands incorrectly describe the behavior for inherited properties. When a property is not set, even in a parent scope, the returned result from the get_..._property() command is the same whether the property is inherited or not. The docs incorrectly stated that an empty string would be returned for inherited properties in such cases.
Diffstat (limited to 'Help/command/get_source_file_property.rst')
-rw-r--r--Help/command/get_source_file_property.rst14
1 files changed, 6 insertions, 8 deletions
diff --git a/Help/command/get_source_file_property.rst b/Help/command/get_source_file_property.rst
index e83e9c2..a7e5191 100644
--- a/Help/command/get_source_file_property.rst
+++ b/Help/command/get_source_file_property.rst
@@ -9,14 +9,12 @@ Get a property for a source file.
[DIRECTORY <dir> | TARGET_DIRECTORY <target>]
<property>)
-Gets a property from a source file. The value of the property is
-stored in the specified ``<variable>``. If the source property is not found,
-the behavior depends on whether it has been defined to be an ``INHERITED``
-property or not (see :command:`define_property`). Non-inherited properties
-will set ``variable`` to ``NOTFOUND``, whereas inherited properties will search
-the relevant parent scope as described for the :command:`define_property`
-command and if still unable to find the property, ``variable`` will be set to
-an empty string.
+Gets a property from a source file. The value of the property is stored in
+the specified ``<variable>``. If the ``<file>`` is not a source file, or the
+source property is not found, ``<variable>`` will be set to ``NOTFOUND``.
+If the source property was defined to be an ``INHERITED`` property (see
+:command:`define_property`), the search will include the relevant parent
+scopes, as described for the :command:`define_property` command.
By default, the source file's property will be read from the current source
directory's scope.