Help: Factor out "may use generator expressions"

This had already been factored out to `GENEX_NOTE.rst`, but wasn't
applied very widely. Consolidate the language to consistently spell out
(a) the reference to `cmake-buildsystem(7)` and (b) the prose 'with the
syntax "$<...>"'.

To accompany the change, modify cmRST to override redefinitions of
substitutions within a single context instead of appending. Otherwise,
with the new note files, `cmake --help-*` prints repeated fragments
when it collates all scopes of a given field (e.g., all
`prop_*/COMPILE_OPTIONS.rst` from
`cmake --help-property COMPILE_OPTIONS`).
This commit is contained in:
Tyler Yankee committed 2026-10-13 11:46:56 -04:00
1 parent c3bdc4476f
commit 67f253a8d2
54 files changed
+131 -214

No files matched your search

+4 -5
View File
@@ -1,6 +1,5 @@
.. |more_see_also| replace:: See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
Arguments to |command_name| may use generator expressions
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. |more_see_also|
Arguments to |command_name| may use
:manual:`generator expressions <cmake-generator-expressions(7)>` with the
syntax ``$<...>``. See the :manual:`cmake-buildsystem(7)` manual for more on
defining buildsystem properties.
+2 -3
View File
@@ -36,10 +36,9 @@ The named ``<target>`` must have been created by a command such as
operates on the target which the alias references.
.. |command_name| replace:: ``target_compile_features``
.. |more_see_also| replace:: See the :manual:`cmake-compile-features(7)`
manual for information on compile features and a list of supported compilers.
.. include:: include/GENEX_NOTE.rst
:start-line: 2
.. include:: /include/COMPILE_FEATURES_NOTE.rst
See Also
^^^^^^^^
+8 -9
View File
@@ -74,16 +74,15 @@ included by absolute path. For example:
)
.. |command_name| replace:: ``target_precompile_headers``
.. |more_see_also| replace:: The :genex:`$<COMPILE_LANGUAGE:...>
<COMPILE_LANGUAGE:languages>` 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 must be specified by absolute path. Also, when specifying angle
brackets inside a generator expression, be sure to encode the closing
``>`` as :genex:`$<ANGLE-R>`. For example:
.. include:: include/GENEX_NOTE.rst
:start-line: 2
The :genex:`$<COMPILE_LANGUAGE:...> <COMPILE_LANGUAGE:languages>` 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 must be specified by absolute path. Also, when specifying angle
brackets inside a generator expression, be sure to encode the closing
``>`` as :genex:`$<ANGLE-R>`. For example:
.. code-block:: cmake
+5
View File
@@ -0,0 +1,5 @@
Contents of |genex_subject| may use
:manual:`generator expressions <cmake-generator-expressions(7)>` with the
syntax ``$<...>``. See the :manual:`cmake-buildsystem(7)` manual for more on
defining buildsystem properties.
+6
View File
@@ -0,0 +1,6 @@
Contents of |genex_subject| may use
:manual:`generator expressions <cmake-generator-expressions(7)>` with the
syntax ``$<...>``. However, :generator:`Xcode` does not support per-config
per-source settings, so expressions that depend on the build configuration are
not allowed with that generator.
+2 -4
View File
@@ -24,10 +24,8 @@ by the native build tool.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.rst
Contents of ``COMPILE_DEFINITIONS`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS``
.. include:: ../include/GENEX_NOTE.rst
The corresponding :prop_dir:`COMPILE_DEFINITIONS_<CONFIG>` property may
be set to specify per-configuration definitions. Generator expressions
+2 -4
View File
@@ -11,9 +11,7 @@ where ``<CONFIG>`` is an upper-case name (ex. ``COMPILE_DEFINITIONS_DEBUG``).
This property will be initialized in each directory by its value in
the directory's parent.
Contents of ``COMPILE_DEFINITIONS_<CONFIG>`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS_<CONFIG>``
.. include:: ../include/GENEX_NOTE.rst
Generator expressions should be preferred instead of setting this property.
+2 -4
View File
@@ -10,7 +10,5 @@ This property is used to initialize the :prop_tgt:`COMPILE_OPTIONS` target
property when a target is created, which is used by the generators to set
the options for the compiler.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -26,7 +26,5 @@ they are meant to affect.
The target property values are used by the generators to set the
include paths for the compiler.
Contents of ``INCLUDE_DIRECTORIES`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -11,7 +11,5 @@ The directory property is used to initialize the :prop_tgt:`LINK_DIRECTORIES`
target property when a target is created. That target property is used
by the generators to set the library search directories for the linker.
Contents of ``LINK_DIRECTORIES`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -13,7 +13,5 @@ This property is used to initialize the :prop_tgt:`LINK_OPTIONS` target
property when a target is created, which is used by the generators to set
the options for the compiler.
Contents of ``LINK_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
+2 -6
View File
@@ -17,12 +17,8 @@ per-configuration definitions on source files.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.rst
Contents of ``COMPILE_DEFINITIONS`` may use :manual:`cmake-generator-expressions(7)`
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. However, :generator:`Xcode`
does not support per-config per-source settings, so expressions
that depend on the build configuration are not allowed with that
generator.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
Related properties:
+2 -6
View File
@@ -10,12 +10,8 @@ of options and will be added to the list of compile flags when the sources of
this file set are built. The options will be added after target-wide options
and source level ones.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. However, :generator:`Xcode`
does not support per-config per-source settings, so expressions
that depend on the build configuration are not allowed with that
generator.
.. |genex_subject| replace:: ``COMPILE_OPTIONS``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
Usage example:
+2 -5
View File
@@ -13,11 +13,8 @@ directories defined at target level and source level except for
Relative paths should not be added to this property directly.
Contents of ``INCLUDE_DIRECTORIES`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. However, :generator:`Xcode` does not support
per-config per-source settings, so expressions that depend on the build
configuration are not allowed with that generator.
.. |genex_subject| replace:: ``INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
Related properties:
@@ -10,7 +10,5 @@ determine the build properties of the consumer. These build properties are only
applied to the sources of the file sets. The other sources of the consumer are
unaffected.
Contents of |PROPERTY_INTERFACE_NAME| may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: |PROPERTY_INTERFACE_NAME|
.. include:: /include/GENEX_NOTE.rst
+2 -4
View File
@@ -20,10 +20,8 @@ The value is a :ref:`semicolon-separated list <CMake Language Lists>` of
command line arguments. Empty arguments are preserved, and a literal
semicolon within an argument may be written as ``\;``.
Contents of ``CMAKE_COMPILE_WRAPPER_<NAME>`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``CMAKE_COMPILE_WRAPPER_<NAME>``
.. include:: ../include/GENEX_NOTE.rst
Example
^^^^^^^
+2 -4
View File
@@ -20,10 +20,8 @@ The value is a :ref:`semicolon-separated list <CMake Language Lists>` of
command line arguments. Empty arguments are preserved, and a literal
semicolon within an argument may be written as ``\;``.
Contents of ``CMAKE_LINK_WRAPPER_<NAME>`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``CMAKE_LINK_WRAPPER_<NAME>``
.. include:: ../include/GENEX_NOTE.rst
Example
^^^^^^^
+2 -4
View File
@@ -18,7 +18,5 @@ by the native build tool.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.rst
Contents of ``COMPILE_DEFINITIONS`` may use :manual:`generator expressions
<cmake-generator-expressions(7)>` with the syntax ``$<...>``. See the
:manual:`cmake-buildsystem(7)` manual for more on defining buildsystem
properties.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -9,9 +9,7 @@ This property holds a :ref:`semicolon-separated list <CMake Language Lists>`
of options specified so far for its rule. Use the
:command:`set_property(RULE)` command to append more options.
Contents of ``COMPILE_OPTIONS`` may use :manual:`generator expressions
<cmake-generator-expressions(7)>` with the syntax ``$<...>``. See the
:manual:`cmake-buildsystem(7)` manual for more on defining buildsystem
properties.
.. |genex_subject| replace:: ``COMPILE_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
.. include:: ../command/include/OPTIONS_SHELL.rst
+2 -4
View File
@@ -14,7 +14,5 @@ paths for the compiler.
Relative paths should not be added to this property.
Contents of ``INCLUDE_DIRECTORIES`` may use :manual:`generator expressions
<cmake-generator-expressions(7)>` with the syntax ``$<...>``. See the
:manual:`cmake-buildsystem(7)` manual for more on defining buildsystem
properties.
.. |genex_subject| replace:: ``INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -6
View File
@@ -21,12 +21,8 @@ definitions on source files.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.rst
Contents of ``COMPILE_DEFINITIONS`` may use :manual:`cmake-generator-expressions(7)`
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. However, :generator:`Xcode`
does not support per-config per-source settings, so expressions
that depend on the build configuration are not allowed with that
generator.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
Prefer using generator expressions in :prop_sf:`!COMPILE_DEFINITIONS` over the
deprecated :prop_sf:`COMPILE_DEFINITIONS_<CONFIG>` property.
+2 -6
View File
@@ -9,12 +9,8 @@ file builds. The flags will be added after target-wide flags.
Use :prop_sf:`COMPILE_DEFINITIONS` to pass additional preprocessor definitions.
Contents of ``COMPILE_FLAGS`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. However, :generator:`Xcode`
does not support per-config per-source settings, so expressions
that depend on the build configuration are not allowed with that
generator.
.. |genex_subject| replace:: ``COMPILE_FLAGS``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
.. note::
+2 -6
View File
@@ -9,12 +9,8 @@ This property holds a :ref:`semicolon-separated list <CMake Language Lists>`
of options and will be added to the list of compile flags when this source
file builds. The options will be added after target-wide options.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. However, :generator:`Xcode`
does not support per-config per-source settings, so expressions
that depend on the build configuration are not allowed with that
generator.
.. |genex_subject| replace:: ``COMPILE_OPTIONS``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
Usage example:
+2 -5
View File
@@ -13,8 +13,5 @@ limitations.
Relative paths should not be added to this property directly.
Contents of ``INCLUDE_DIRECTORIES`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. However, :generator:`Xcode` does not support
per-config per-source settings, so expressions that depend on the build
configuration are not allowed with that generator.
.. |genex_subject| replace:: ``INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE_PER_SOURCE.rst
+2 -3
View File
@@ -11,6 +11,5 @@ semicolons. This property is initialized by the value of the
:variable:`CMAKE_ANDROID_JAR_DIRECTORIES` variable if it is set when
a target is created.
Contents of ``ANDROID_JAR_DIRECTORIES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions.
.. |genex_subject| replace:: ``ANDROID_JAR_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
@@ -10,7 +10,5 @@ This property is initialized by the value of the
:variable:`CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES` variable if it is set
when a target is created.
Contents of ``ANDROID_NATIVE_LIB_DEPENDENCIES`` may use
"generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for
available expressions.
.. |genex_subject| replace:: ``ANDROID_NATIVE_LIB_DEPENDENCIES``
.. include:: ../include/GENEX_NOTE.rst
@@ -13,6 +13,5 @@ This property is initialized by the value of the
:variable:`CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES` variable if it is set when a
target is created.
Contents of ``ANDROID_NATIVE_LIB_DIRECTORIES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions.
.. |genex_subject| replace:: ``ANDROID_NATIVE_LIB_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -3
View File
@@ -17,9 +17,8 @@ created, or an empty string otherwise.
The options set on the target may be overridden by :prop_sf:`AUTOUIC_OPTIONS`
set on the ``.ui`` source file.
This property may use "generator expressions" with the syntax ``$<...>``.
See the :manual:`cmake-generator-expressions(7)` manual for available
expressions.
.. |genex_subject| replace:: ``AUTOUIC_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
+2 -4
View File
@@ -18,10 +18,8 @@ by the native build tool.
.. include:: /include/COMPILE_DEFINITIONS_DISCLAIMER.rst
Contents of ``COMPILE_DEFINITIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS``
.. include:: ../include/GENEX_NOTE.rst
The corresponding :prop_tgt:`COMPILE_DEFINITIONS_<CONFIG>` property may
be set to specify per-configuration definitions. Generator expressions
+2 -4
View File
@@ -8,9 +8,7 @@ Per-configuration preprocessor definitions on a target.
This is the configuration-specific version of :prop_tgt:`COMPILE_DEFINITIONS`
where ``<CONFIG>`` is an upper-case name (ex. ``COMPILE_DEFINITIONS_DEBUG``).
Contents of ``COMPILE_DEFINITIONS_<CONFIG>`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_DEFINITIONS_<CONFIG>``
.. include:: ../include/GENEX_NOTE.rst
Generator expressions should be preferred instead of setting this property.
+4 -4
View File
@@ -9,7 +9,7 @@ The list of features in this property are a subset of the features listed
in the :variable:`CMAKE_C_COMPILE_FEATURES`, :variable:`CMAKE_CUDA_COMPILE_FEATURES`, and
:variable:`CMAKE_CXX_COMPILE_FEATURES` variables.
Contents of ``COMPILE_FEATURES`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for
available expressions. See the :manual:`cmake-compile-features(7)` manual
for information on compile features and a list of supported compilers.
Contents of ``COMPILE_FEATURES`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
+2 -4
View File
@@ -19,9 +19,7 @@ This property is initialized by the :prop_dir:`COMPILE_OPTIONS` directory
property when a target is created, and is used by the generators to set
the options for the compiler.
Contents of ``COMPILE_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
.. include:: ../command/include/OPTIONS_SHELL.rst
+2 -4
View File
@@ -22,10 +22,8 @@ This property is supported only by :ref:`Makefile Generators` and
supported only when the target's language is one of: ``C``, ``CXX``, ``CUDA``,
``Fortran``, ``HIP``, ``ISPC``, ``OBJC``, ``OBJCXX``.
Contents of ``COMPILE_WRAPPERS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for
available expressions. See the :manual:`cmake-buildsystem(7)` manual for more
on defining buildsystem properties.
.. |genex_subject| replace:: ``COMPILE_WRAPPERS``
.. include:: ../include/GENEX_NOTE.rst
Interaction With Launchers
^^^^^^^^^^^^^^^^^^^^^^^^^^
+2 -2
View File
@@ -20,8 +20,8 @@ in an :command:`install(TARGETS)` command, but the user is responsible for
ensuring that the target's build artifacts are not missing or outdated when
an install is performed.
This property may use "generator expressions" with the syntax ``$<...>``. See
the :manual:`cmake-generator-expressions(7)` manual for available expressions.
.. |genex_subject| replace:: ``EXCLUDE_FROM_ALL``
.. include:: ../include/GENEX_NOTE.rst
Only the "Ninja Multi-Config" generator supports a property value that varies by
configuration. For all other generators the value of this property must be the
+2 -4
View File
@@ -18,7 +18,5 @@ paths for the compiler.
Relative paths should not be added to this property directly. Use one of
the commands above instead to handle relative paths.
Contents of ``INCLUDE_DIRECTORIES`` may use :manual:`cmake-generator-expressions(7)` with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -2
View File
@@ -12,5 +12,5 @@ own :prop_tgt:`AUTOUIC_OPTIONS` property such as
specified in the interface of ``foo``. This is done automatically by
the :command:`target_link_libraries` command.
This property supports generator expressions. See the
:manual:`cmake-generator-expressions(7)` manual for available expressions.
.. |genex_subject| replace:: ``INTERFACE_AUTOUIC_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -14,10 +14,8 @@ When target dependencies are specified using :command:`target_link_libraries`,
CMake will read this property from all target dependencies to determine the
build properties of the consumer.
Contents of ``INTERFACE_LINK_DEPENDS`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INTERFACE_LINK_DEPENDS``
.. include:: ../include/GENEX_NOTE.rst
Link dependency files usage requirements commonly differ between the build-tree
and the install-tree. The :genex:`BUILD_INTERFACE` and
+2 -4
View File
@@ -19,10 +19,8 @@ property, are linked first, followed by indirect dependencies from the
transitive closure of the direct dependencies'
``INTERFACE_LINK_LIBRARIES`` properties. See policy :policy:`CMP0022`.
Contents of ``INTERFACE_LINK_LIBRARIES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INTERFACE_LINK_LIBRARIES``
.. include:: ../include/GENEX_NOTE.rst
.. include:: include/LINK_LIBRARIES_INDIRECTION.rst
@@ -15,8 +15,5 @@ undefined, then consumers will determine their
must ensure that the targets that they link to have a consistent
requirement for their ``INTERFACE_POSITION_INDEPENDENT_CODE`` property.
Contents of ``INTERFACE_POSITION_INDEPENDENT_CODE`` may use
"generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available expressions.
See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem
properties.
.. |genex_subject| replace:: ``INTERFACE_POSITION_INDEPENDENT_CODE``
.. include:: ../include/GENEX_NOTE.rst
@@ -12,7 +12,5 @@ command populates this property with values given to the ``PUBLIC`` and
See the discussion in :command:`target_precompile_headers` for guidance on
appropriate use of this property for installed or exported targets.
Contents of ``INTERFACE_PRECOMPILE_HEADERS`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INTERFACE_PRECOMPILE_HEADERS``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -14,7 +14,5 @@ When target dependencies are specified using :command:`target_link_libraries`,
CMake will read this property from all target dependencies to determine the
sources of the consumer.
Contents of ``INTERFACE_SOURCES`` may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``INTERFACE_SOURCES``
.. include:: ../include/GENEX_NOTE.rst
@@ -24,8 +24,5 @@ When target dependencies are specified using :command:`target_link_libraries`,
CMake will read this property from all target dependencies to mark the
same include directories as containing system headers.
Contents of ``INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`` may use "generator
expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available expressions.
See the :manual:`cmake-buildsystem(7)` manual for more on defining
buildsystem properties.
.. |genex_subject| replace:: ``INTERFACE_SYSTEM_INCLUDE_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -12,7 +12,5 @@ This property is supported only by :generator:`Ninja` and
intended to specify dependencies on "linker scripts" for custom Makefile link
rules.
Contents of ``LINK_DEPENDS`` may use "generator expressions" with
the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_DEPENDS``
.. include:: ../include/GENEX_NOTE.rst
+2 -4
View File
@@ -14,7 +14,5 @@ This property is initialized by the :prop_dir:`LINK_DIRECTORIES` directory
property when a target is created, and is used by the generators to set
the search directories for the linker.
Contents of ``LINK_DIRECTORIES`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_DIRECTORIES``
.. include:: ../include/GENEX_NOTE.rst
+4 -6
View File
@@ -14,13 +14,11 @@ followed by indirect dependencies from the transitive closure of the
direct dependencies' :prop_tgt:`INTERFACE_LINK_LIBRARIES` properties.
See policy :policy:`CMP0022`.
Contents of ``LINK_LIBRARIES`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>` with the
syntax ``$<...>``. Policy :policy:`CMP0131` affects the behavior of the
:genex:`LINK_ONLY` generator expression for this property.
.. |genex_subject| replace:: ``LINK_LIBRARIES``
.. include:: ../include/GENEX_NOTE.rst
See the :manual:`cmake-buildsystem(7)` manual for more on defining
buildsystem properties.
Policy :policy:`CMP0131` affects the behavior of the
:genex:`LINK_ONLY` generator expression for this property.
.. include:: include/LINK_LIBRARIES_INDIRECTION.rst
+2 -4
View File
@@ -20,10 +20,8 @@ This property is initialized by the :prop_dir:`LINK_OPTIONS` directory
property when a target is created, and is used by the generators to set
the options for the compiler.
Contents of ``LINK_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
.. note::
+2 -4
View File
@@ -22,10 +22,8 @@ This property is supported only by :ref:`Makefile Generators` and
supported only when the target's language is one of: ``C``, ``CXX``, ``CUDA``,
``OBJC``, ``OBJCXX``, ``Fortran``, ``HIP``.
Contents of ``LINK_WRAPPERS`` may use "generator expressions" with the syntax
``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for
available expressions. See the :manual:`cmake-buildsystem(7)` manual for more
on defining buildsystem properties.
.. |genex_subject| replace:: ``LINK_WRAPPERS``
.. include:: ../include/GENEX_NOTE.rst
Wrappers apply to the link command of executables, shared libraries, and
module libraries. As with :prop_tgt:`<LANG>_LINKER_LAUNCHER`, they do not
+2 -4
View File
@@ -11,10 +11,8 @@ This property holds a :ref:`semicolon-separated list <CMake Language Lists>` of
specified so far for its target. Use :command:`set_target_properties` or
:command:`set_property` commands to set its content.
Contents of ``STATIC_LIBRARY_OPTIONS`` may use "generator expressions" with the
syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual
for available expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``STATIC_LIBRARY_OPTIONS``
.. include:: ../include/GENEX_NOTE.rst
.. note::
@@ -15,8 +15,5 @@ model of the project and can break things.
See the :variable:`CMAKE_XCODE_ATTRIBUTE_<an-attribute>` variable
to set attributes on all targets in a directory tree.
Contents of ``XCODE_ATTRIBUTE_<an-attribute>`` may use
"generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available
expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``XCODE_ATTRIBUTE_<an-attribute>``
.. include:: ../include/GENEX_NOTE.rst
@@ -10,7 +10,5 @@ When target dependencies are specified using :command:`target_link_libraries`,
CMake will read this property from all target dependencies to determine the
build properties of the consumer.
Contents of |PROPERTY_INTERFACE_NAME| may use "generator expressions"
with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)`
manual for available expressions. See the :manual:`cmake-buildsystem(7)`
manual for more on defining buildsystem properties.
.. |genex_subject| replace:: |PROPERTY_INTERFACE_NAME|
.. include:: /include/GENEX_NOTE.rst
@@ -17,8 +17,5 @@ model of the project and can break things.
See the :prop_tgt:`XCODE_ATTRIBUTE_<an-attribute>` target property
to set attributes on a specific target.
Contents of ``CMAKE_XCODE_ATTRIBUTE_<an-attribute>`` may use
"generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available
expressions. See the :manual:`cmake-buildsystem(7)` manual
for more on defining buildsystem properties.
.. |genex_subject| replace:: ``CMAKE_XCODE_ATTRIBUTE_<an-attribute>``
.. include:: ../include/GENEX_NOTE.rst
+3 -2
View File
@@ -438,9 +438,10 @@ void cmRST::ProcessDirectiveCodeBlock()
void cmRST::ProcessDirectiveReplace()
{
// Record markup lines as replacement text.
// Record markup lines as replacement text. Documents processed
// together share one context, so a redefinition must override.
std::string& replacement = this->Replace[0][this->ReplaceName];
replacement += cmJoin(this->MarkupLines, " ");
replacement = cmJoin(this->MarkupLines, " ");
this->ReplaceName.clear();
}
+2
View File
@@ -186,3 +186,5 @@ this text is a different length
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Substitutions in headers should cause the header line's length to be updated.
A second definition uses only the last definition.
+5
View File
@@ -195,3 +195,8 @@ Testing a |delayed substitution|.
.. |header substitution| replace:: this text is a different length
Substitutions in headers should cause the header line's length to be updated.
.. |redefined substitution| replace:: first definition
.. |redefined substitution| replace:: second definition
A |redefined substitution| uses only the last definition.