summaryrefslogtreecommitdiffstats
path: root/Help/command/get_target_property.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2018-03-21 10:32:21 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-03-21 10:39:54 (GMT)
commitff6234509e34269767b4f7d97a824e5899d0ba2a (patch)
tree8f16ed9ad4b48254d349a3afdb970d118e59645d /Help/command/get_target_property.rst
parent9cc97ab4dc647b1ca9b67bb7300453c8341607a7 (diff)
downloadCMake-ff6234509e34269767b4f7d97a824e5899d0ba2a.zip
CMake-ff6234509e34269767b4f7d97a824e5899d0ba2a.tar.gz
CMake-ff6234509e34269767b4f7d97a824e5899d0ba2a.tar.bz2
Help: Clarify behavior of INHERITED properties
Fixes: #17839
Diffstat (limited to 'Help/command/get_target_property.rst')
-rw-r--r--Help/command/get_target_property.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Help/command/get_target_property.rst b/Help/command/get_target_property.rst
index 2a72c3a..3d159dc 100644
--- a/Help/command/get_target_property.rst
+++ b/Help/command/get_target_property.rst
@@ -8,8 +8,15 @@ Get a property from a target.
get_target_property(VAR target property)
Get a property from a target. The value of the property is stored in
-the variable ``VAR``. If the property is not found, ``VAR`` will be set to
-"NOTFOUND". Use :command:`set_target_properties` to set property values.
+the variable ``VAR``. If the target 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 ``VAR`` to "NOTFOUND", whereas inheritied properties will search the
+relevent parent scope as described for the :command:`define_property`
+command and if still unable to find the property, ``VAR`` will be set to
+an empty string.
+
+Use :command:`set_target_properties` to set target property values.
Properties are usually used to control how a target is built, but some
query the target instead. This command can get properties for any
target so far created. The targets do not need to be in the current