2013-10-15 19:17:36 +04:00
|
|
|
get_property
|
|
|
|
------------
|
|
|
|
|
|
|
|
Get a property.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
get_property(<variable>
|
|
|
|
<GLOBAL |
|
|
|
|
DIRECTORY [dir] |
|
|
|
|
TARGET <target> |
|
|
|
|
SOURCE <source> |
|
2014-11-27 01:22:24 +03:00
|
|
|
INSTALL <file> |
|
2013-10-15 19:17:36 +04:00
|
|
|
TEST <test> |
|
|
|
|
CACHE <entry> |
|
|
|
|
VARIABLE>
|
|
|
|
PROPERTY <name>
|
|
|
|
[SET | DEFINED | BRIEF_DOCS | FULL_DOCS])
|
|
|
|
|
|
|
|
Get one property from one object in a scope. The first argument
|
|
|
|
specifies the variable in which to store the result. The second
|
|
|
|
argument determines the scope from which to get the property. It must
|
|
|
|
be one of the following:
|
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``GLOBAL``
|
|
|
|
Scope is unique and does not accept a name.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``DIRECTORY``
|
|
|
|
Scope defaults to the current directory but another
|
|
|
|
directory (already processed by CMake) may be named by full or
|
|
|
|
relative path.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``TARGET``
|
|
|
|
Scope must name one existing target.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``SOURCE``
|
|
|
|
Scope must name one source file.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:22:24 +03:00
|
|
|
``INSTALL``
|
|
|
|
Scope must name one installed file path.
|
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``TEST``
|
|
|
|
Scope must name one existing test.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``CACHE``
|
|
|
|
Scope must name one cache entry.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
``VARIABLE``
|
|
|
|
Scope is unique and does not accept a name.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2014-11-27 01:27:31 +03:00
|
|
|
The required ``PROPERTY`` option is immediately followed by the name of
|
2013-10-15 19:17:36 +04:00
|
|
|
the property to get. If the property is not set an empty value is
|
2014-11-27 01:27:31 +03:00
|
|
|
returned. If the ``SET`` option is given the variable is set to a boolean
|
|
|
|
value indicating whether the property has been set. If the ``DEFINED``
|
2013-10-15 19:17:36 +04:00
|
|
|
option is given the variable is set to a boolean value indicating
|
2014-11-27 01:27:31 +03:00
|
|
|
whether the property has been defined such as with the
|
|
|
|
:command:`define_property` command.
|
|
|
|
If ``BRIEF_DOCS`` or ``FULL_DOCS`` is given then the variable is set to a
|
2013-10-15 19:17:36 +04:00
|
|
|
string containing documentation for the requested property. If
|
|
|
|
documentation is requested for a property that has not been defined
|
2014-11-27 01:27:31 +03:00
|
|
|
``NOTFOUND`` is returned.
|