get_property(TEST): Add DIRECTORY option

This commit is contained in:
Kyle Edwards
2023-08-10 17:31:07 -04:00
parent efc8f19cc5
commit 84e76fedb0
3 changed files with 40 additions and 8 deletions

View File

@@ -12,7 +12,8 @@ Get a property.
SOURCE <source>
[DIRECTORY <dir> | TARGET_DIRECTORY <target>] |
INSTALL <file> |
TEST <test> |
TEST <test>
[DIRECTORY <dir>] |
CACHE <entry> |
VARIABLE >
PROPERTY <name>
@@ -73,6 +74,16 @@ It must be one of the following:
Scope must name one existing test.
See also the :command:`get_test_property` command.
.. 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 the directory, either by having added
it through a call to :command:`add_subdirectory` or ``<dir>`` being the top
level directory. Relative paths are treated as relative to the current
source directory. ``<dir>`` may reference a binary directory.
``CACHE``
Scope must name one cache entry.

View File

@@ -7,3 +7,6 @@ test-properties-directory
* The :command:`set_tests_properties` command gained a ``DIRECTORY``
sub-option, which allows you to set properties on tests in other
directories.
* The ``TEST`` mode of the :command:`get_property` command gained a
``DIRECTORY`` sub-option, which allows you to get properties on tests in
other directories.