get_test_property.rst 785 B

123456789101112131415161718192021
  1. get_test_property
  2. -----------------
  3. Get a property of the test.
  4. .. code-block:: cmake
  5. get_test_property(test property VAR)
  6. Get a property from the test. The value of the property is stored in
  7. the variable ``VAR``. If the test property is not found, the behavior
  8. depends on whether it has been defined to be an ``INHERITED`` property
  9. or not (see :command:`define_property`). Non-inherited properties will
  10. set ``VAR`` to "NOTFOUND", whereas inherited properties will search the
  11. relevant parent scope as described for the :command:`define_property`
  12. command and if still unable to find the property, ``VAR`` will be set to
  13. an empty string.
  14. For a list of standard properties you can type ``cmake --help-property-list``.
  15. See also the more general :command:`get_property` command.