diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-03-13 19:44:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-13 21:04:52 (GMT) |
commit | 2e37a20f027aaf6dd098b58fcb3147706782c1fa (patch) | |
tree | 9db901cfb676549070461c10d8bdf783f6608dec /Help | |
parent | bd4616f624ec71f4cc9906d69c4a2b138efed0d4 (diff) | |
download | CMake-2e37a20f027aaf6dd098b58fcb3147706782c1fa.zip CMake-2e37a20f027aaf6dd098b58fcb3147706782c1fa.tar.gz CMake-2e37a20f027aaf6dd098b58fcb3147706782c1fa.tar.bz2 |
Utilities/Sphinx: Allow explicit target for genex
Split the genex directive into its own class, allowing a slight
simplification of CMakeObject. Add ability to specify an explicit target
name for the same.
Use this to provide a target for the `$<TARGET_PROPERTY:prop>` generator
expression which is otherwise missing one (due to overlap with
`$<TARGET_PROPERTY:tgt,prop>`). With this one can write:
:genex:`$<TARGET_PROPERTY:prop> <TARGET_PROPERTY:prop>`
to link the second variant.
Fixes: #24573
Diffstat (limited to 'Help')
-rw-r--r-- | Help/dev/documentation.rst | 4 | ||||
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Help/dev/documentation.rst b/Help/dev/documentation.rst index 8cd71b4..1dd23c6 100644 --- a/Help/dev/documentation.rst +++ b/Help/dev/documentation.rst @@ -241,6 +241,10 @@ Document a "genex" object: The directive requires a single argument, the generator expression name. +The optional ``:target:`` option allows a custom target name to be specified. +Because this will affect the ability to reference the "genex" object using the +``:genex:`` role, this option should be used very sparingly. + ``signature`` directive ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index a640c13..9da3799 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -1418,6 +1418,7 @@ In the following, the phrase "the ``tgt`` filename" means the name of the expression is being evaluated. .. genex:: $<TARGET_PROPERTY:prop> + :target: TARGET_PROPERTY:prop Value of the property ``prop`` on the target for which the expression is being evaluated. Note that for generator expressions in |