From 36145e2680f764b75cf656b6cba54114333df116 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Apr 2024 14:23:51 -0400 Subject: [PATCH] Help: Organize target-dependent generator expressions into subsections --- Help/manual/cmake-generator-expressions.7.rst | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 62c0e8878a..9630de6c07 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -1707,17 +1707,10 @@ Link Context Target-Dependent Expressions ---------------------------- -These queries refer to a target ``tgt``. Unless otherwise stated, this can -be any runtime artifact, namely: +Target Meta-Data +^^^^^^^^^^^^^^^^ -* An executable target created by :command:`add_executable`. -* A shared library target (``.so``, ``.dll`` but not their ``.lib`` import - library) created by :command:`add_library`. -* A static library target created by :command:`add_library`. - -In the following, the phrase "the ``tgt`` filename" means the name of the -``tgt`` binary file. This has to be distinguished from the phrase -"the target name", which is just the string ``tgt``. +These expressions look up information about a target. .. genex:: $ @@ -1740,6 +1733,20 @@ In the following, the phrase "the ``tgt`` filename" means the name of the targets to multiple dependent export sets. The ``...`` must be a literal name of a target, it may not contain generator expressions. +.. genex:: $ + + ``1`` if the ``policy`` was ``NEW`` when the 'head' target was created, + else ``0``. If the ``policy`` was not set, the warning message for the policy + will be emitted. This generator expression only works for a subset of + policies. + + +Target Properties +^^^^^^^^^^^^^^^^^ + +These expressions look up the values of +:ref:`target properties `. + .. genex:: $ Value of the property ``prop`` on the target ``tgt``. @@ -1763,19 +1770,22 @@ In the following, the phrase "the ``tgt`` filename" means the name of the :ref:`usage requirements ` this is the consuming target rather than the target specifying the requirement. -.. genex:: $ - .. versionadded:: 3.1 +Target Artifacts +^^^^^^^^^^^^^^^^ - List of objects resulting from building ``tgt``. This would typically be - used on :ref:`object library ` targets. +These expressions look up information about artifacts associated with +a given target ``tgt``. Unless otherwise stated, this can be any +runtime artifact, namely: -.. genex:: $ +* An executable target created by :command:`add_executable`. +* A shared library target (``.so``, ``.dll`` but not their ``.lib`` import + library) created by :command:`add_library`. +* A static library target created by :command:`add_library`. - ``1`` if the ``policy`` was ``NEW`` when the 'head' target was created, - else ``0``. If the ``policy`` was not set, the warning message for the policy - will be emitted. This generator expression only works for a subset of - policies. +In the following, the phrase "the ``tgt`` filename" means the name of the +``tgt`` binary file. This has to be distinguished from the phrase +"the target name", which is just the string ``tgt``. .. genex:: $ @@ -2257,6 +2267,13 @@ In the following, the phrase "the ``tgt`` filename" means the name of the Note that ``tgt`` is not added as a dependency of the target this expression is evaluated on (see policy :policy:`CMP0112`). +.. genex:: $ + + .. versionadded:: 3.1 + + List of objects resulting from building ``tgt``. This would typically be + used on :ref:`object library ` targets. + .. genex:: $ .. versionadded:: 3.21