mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
CMakePrintHelpers: Extend documentation
- Added intro code block showing how to include this module. - Used "commands" instead of "functions". - Reworded descriptions a bit.
This commit is contained in:
@@ -5,35 +5,47 @@
|
|||||||
CMakePrintHelpers
|
CMakePrintHelpers
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Convenience functions for printing properties and variables, useful
|
This module provides convenience commands, primarily intended for debugging,
|
||||||
e.g. for debugging.
|
to print the values of properties and variables.
|
||||||
|
|
||||||
|
Load this module in CMake with:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
|
||||||
|
include(CMakePrintHelpers)
|
||||||
|
|
||||||
Commands
|
Commands
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
|
This module provides the following commands:
|
||||||
|
|
||||||
.. command:: cmake_print_properties
|
.. command:: cmake_print_properties
|
||||||
|
|
||||||
|
Prints the values of properties for the specified targets, source files,
|
||||||
|
directories, tests, or cache entries:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_print_properties(<TARGETS [<target1> ...] |
|
cmake_print_properties(
|
||||||
SOURCES [<source1> ...] |
|
<TARGETS [<targets>...] |
|
||||||
DIRECTORIES [<dir1> ...] |
|
SOURCES [<sources>...] |
|
||||||
TESTS [<test1> ...] |
|
DIRECTORIES [<dirs>...] |
|
||||||
CACHE_ENTRIES [<entry1> ...] >
|
TESTS [<tests>...] |
|
||||||
PROPERTIES [<prop1> ...])
|
CACHE_ENTRIES [<entries>...] >
|
||||||
|
PROPERTIES [<properties>...]
|
||||||
|
)
|
||||||
|
|
||||||
This function prints the values of the properties of the given targets,
|
Exactly one of the scope keywords must be specified. The scope keyword
|
||||||
source files, directories, tests or cache entries. Exactly one of the
|
and its arguments must appear before the ``PROPERTIES`` keyword in the
|
||||||
scope keywords must be used. The scope keyword and its arguments must
|
argument list.
|
||||||
come before the ``PROPERTIES`` keyword in the arguments list.
|
|
||||||
|
|
||||||
.. command:: cmake_print_variables
|
.. command:: cmake_print_variables
|
||||||
|
|
||||||
|
Prints each variable name followed by its value:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_print_variables([var1 [var2 ... [varN]]])
|
cmake_print_variables([<vars>...])
|
||||||
|
|
||||||
This function prints the name of each variable followed by its value.
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|||||||
Reference in New Issue
Block a user