From 5dd356cefcc128c3be8d908a4c89140865467ee2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 5 Feb 2021 13:14:34 -0500 Subject: Help: Convert some genex names to explicit cross-references Since commit c2dc7e0f53 (Help: Convert genex documentation to sphinx domain objects, 2021-01-15) we can use `:genex:` cross-references to link to named generator expressions. Update some places to do this. This is meant to demonstrate the capability, not as a comprehensive sweep. --- Help/command/add_custom_command.rst | 4 ++-- Help/command/add_custom_target.rst | 4 ++-- Help/command/target_precompile_headers.rst | 4 ++-- Help/policy/CMP0026.rst | 4 ++-- Help/policy/CMP0051.rst | 2 +- Help/prop_tgt/INSTALL_NAME_DIR.rst | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 9a4efd1..183bb72 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -111,8 +111,8 @@ The options are: Arguments to ``COMMAND`` may use :manual:`generator expressions `. - Use the ``TARGET_FILE`` generator expression to refer to the location of - a target later in the command line (i.e. as a command argument rather + Use the :genex:`TARGET_FILE` generator expression to refer to the location + of a target later in the command line (i.e. as a command argument rather than as the command to execute). Whenever one of the following target based generator expressions are used as diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 9c4d60d..22d3f29 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -84,8 +84,8 @@ The options are: Arguments to ``COMMAND`` may use :manual:`generator expressions `. - Use the ``TARGET_FILE`` generator expression to refer to the location of - a target later in the command line (i.e. as a command argument rather + Use the :genex:`TARGET_FILE` generator expression to refer to the location + of a target later in the command line (i.e. as a command argument rather than as the command to execute). Whenever one of the following target based generator expressions are used as diff --git a/Help/command/target_precompile_headers.rst b/Help/command/target_precompile_headers.rst index 7005180..9f7dabb 100644 --- a/Help/command/target_precompile_headers.rst +++ b/Help/command/target_precompile_headers.rst @@ -34,7 +34,7 @@ Repeated calls for the same ```` will append items in the order called. Projects should generally avoid using ``PUBLIC`` or ``INTERFACE`` for targets that will be :ref:`exported `, or they should at least use -the ``$`` generator expression to prevent precompile +the :genex:`$` generator expression to prevent precompile headers from appearing in an installed exported target. Consumers of a target should typically be in control of what precompile headers they use, not have precompile headers forced on them by the targets being consumed (since @@ -74,7 +74,7 @@ Arguments to ``target_precompile_headers()`` may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. -The ``$`` generator expression is particularly +The :genex:`$` generator expression is particularly useful for specifying a language-specific header to precompile for only one language (e.g. ``CXX`` and not ``C``). In this case, header file names that are not explicitly in double quotes or angle brackets diff --git a/Help/policy/CMP0026.rst b/Help/policy/CMP0026.rst index 3401d4a..e08fd54 100644 --- a/Help/policy/CMP0026.rst +++ b/Help/policy/CMP0026.rst @@ -9,12 +9,12 @@ determine the eventual location of build targets. This relies on the assumption that all necessary information is available at configure-time to determine the final location and filename of the target. However, this property is not fully determined until later at -generate-time. At generate time, the ``$`` generator +generate-time. At generate time, the :genex:`$` generator expression can be used to determine the eventual :prop_tgt:`LOCATION` of a target output. Code which reads the :prop_tgt:`LOCATION` target property can be ported to -use the ``$`` generator expression together with the +use the :genex:`$` generator expression together with the :command:`file(GENERATE)` subcommand to generate a file containing the target location. diff --git a/Help/policy/CMP0051.rst b/Help/policy/CMP0051.rst index 053bc97..3558909 100644 --- a/Help/policy/CMP0051.rst +++ b/Help/policy/CMP0051.rst @@ -3,7 +3,7 @@ CMP0051 .. versionadded:: 3.1 -List TARGET_OBJECTS in SOURCES target property. +List :genex:`TARGET_OBJECTS` in SOURCES target property. CMake 3.0 and lower did not include the ``TARGET_OBJECTS`` :manual:`generator expression ` when diff --git a/Help/prop_tgt/INSTALL_NAME_DIR.rst b/Help/prop_tgt/INSTALL_NAME_DIR.rst index 747615a..8faefb7 100644 --- a/Help/prop_tgt/INSTALL_NAME_DIR.rst +++ b/Help/prop_tgt/INSTALL_NAME_DIR.rst @@ -12,5 +12,5 @@ This property is initialized by the value of the variable created. This property supports :manual:`generator expressions `. -In particular, the ``$`` generator expression can be used to set the -directory relative to the install-time prefix. +In particular, the :genex:`$` generator expression can be +used to set the directory relative to the install-time prefix. -- cgit v0.12