Help: Use <variable> consistently in property getter commands
Property-related commands used a mix of <VAR>, <var>, or <variable> to specify the variable to store the result in. The <VAR> form is particularly confusing, since being uppercase it looks more like a keyword. Use <variable> consistently across all the commands so that the behavior is clear.
This commit is contained in:
parent
29ccc9a4cd
commit
34379f005b
@ -5,11 +5,11 @@ Get a global property of the CMake instance.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
get_cmake_property(<var> <property>)
|
||||
get_cmake_property(<variable> <property>)
|
||||
|
||||
Gets a global property from the CMake instance. The value of
|
||||
the ``<property>`` is stored in the variable ``<var>``.
|
||||
If the property is not found, ``<var>`` will be set to ``NOTFOUND``.
|
||||
the ``<property>`` is stored in the specified ``<variable>``.
|
||||
If the property is not found, ``<variable>`` will be set to ``NOTFOUND``.
|
||||
See the :manual:`cmake-properties(7)` manual for available properties.
|
||||
|
||||
In addition to global properties, this command (for historical reasons)
|
||||
|
@ -5,15 +5,15 @@ Get a property from a target.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
get_target_property(<VAR> <target> <property>)
|
||||
get_target_property(<variable> <target> <property>)
|
||||
|
||||
Get a property from a target. The value of the property is stored in
|
||||
the variable ``<VAR>``. If the target property is not found, the behavior
|
||||
Get a property from a target. The value of the property is stored in the
|
||||
specified ``<variable>``. 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 ``<VAR>-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, ``<VAR>`` will be set to
|
||||
or not (see :command:`define_property`). Non-inherited properties will set
|
||||
``<variable>`` to ``<variable>-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.
|
||||
|
||||
Use :command:`set_target_properties` to set target property values.
|
||||
|
@ -5,15 +5,15 @@ Get a property of the test.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
get_test_property(<test> <property> [DIRECTORY <dir>] <VAR>)
|
||||
get_test_property(<test> <property> [DIRECTORY <dir>] <variable>)
|
||||
|
||||
Get a property from the test. The value of the property is stored in
|
||||
the variable ``<VAR>``. If the test property is not found, the behavior
|
||||
the specified ``<variable>``. If the test 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 inherited properties will search the
|
||||
``<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, ``<VAR>`` will be set to
|
||||
command and if still unable to find the property, ``<variable>`` will be set to
|
||||
an empty string.
|
||||
|
||||
For a list of standard properties you can type
|
||||
|
Loading…
Reference in New Issue
Block a user