2014-08-03 19:52:23 +02:00
|
|
|
get_test_property
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Get a property of the test.
|
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
.. code-block:: cmake
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2024-02-02 17:42:32 +01:00
|
|
|
get_test_property(<test> <property> [DIRECTORY <dir>] <variable>)
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2015-04-27 22:25:09 +02:00
|
|
|
Get a property from the test. The value of the property is stored in
|
2024-02-02 17:42:32 +01:00
|
|
|
the specified ``<variable>``. If the ``<test>`` is not defined, or the
|
|
|
|
test property is not found, ``<variable>`` will be set to ``NOTFOUND``.
|
|
|
|
If the test 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.
|
2018-08-09 18:06:22 +02:00
|
|
|
|
2022-11-16 20:14:03 +01:00
|
|
|
For a list of standard properties you can type
|
|
|
|
:option:`cmake --help-property-list`.
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2023-12-07 09:12:54 +01:00
|
|
|
.. versionadded:: 3.28
|
|
|
|
Directory scope can be overridden with the following sub-option:
|
|
|
|
|
|
|
|
``DIRECTORY <dir>``
|
|
|
|
The test property will be read from the ``<dir>`` directory's
|
|
|
|
scope. CMake must already know about that source directory, either by
|
|
|
|
having added it through a call to :command:`add_subdirectory` or ``<dir>``
|
|
|
|
being the top level source directory. Relative paths are treated as
|
|
|
|
relative to the current source directory. ``<dir>`` may reference a binary
|
|
|
|
directory.
|
|
|
|
|
2023-05-23 16:38:00 +02:00
|
|
|
See Also
|
|
|
|
^^^^^^^^
|
|
|
|
|
|
|
|
* :command:`define_property`
|
|
|
|
* the more general :command:`get_property` command
|