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
This commit is contained in:
Matthew Woehlke
2023-03-13 15:44:12 -04:00
committed by Brad King
parent bd4616f624
commit 2e37a20f02
3 changed files with 34 additions and 5 deletions
+4
View File
@@ -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
^^^^^^^^^^^^^^^^^^^^^^^