diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-11-06 21:27:21 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2022-11-09 19:52:30 (GMT) |
commit | d4d1f8529752f25c64d3d0ab54768b7b93785a3f (patch) | |
tree | dddfcd3cc94ae38312fdb09ff90139510e66d4fc /Help/command | |
parent | 968224484f1c32fc2057addb44a6e533f384dd2b (diff) | |
download | CMake-d4d1f8529752f25c64d3d0ab54768b7b93785a3f.zip CMake-d4d1f8529752f25c64d3d0ab54768b7b93785a3f.tar.gz CMake-d4d1f8529752f25c64d3d0ab54768b7b93785a3f.tar.bz2 |
Help: Move a note about arguments and genexes into include file
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/GENEX_NOTE.txt | 6 | ||||
-rw-r--r-- | Help/command/add_compile_definitions.rst | 6 | ||||
-rw-r--r-- | Help/command/add_compile_options.rst | 6 | ||||
-rw-r--r-- | Help/command/add_link_options.rst | 6 | ||||
-rw-r--r-- | Help/command/include_directories.rst | 6 | ||||
-rw-r--r-- | Help/command/target_compile_definitions.rst | 6 | ||||
-rw-r--r-- | Help/command/target_compile_features.rst | 10 | ||||
-rw-r--r-- | Help/command/target_compile_options.rst | 6 | ||||
-rw-r--r-- | Help/command/target_include_directories.rst | 6 | ||||
-rw-r--r-- | Help/command/target_link_directories.rst | 6 | ||||
-rw-r--r-- | Help/command/target_link_options.rst | 6 | ||||
-rw-r--r-- | Help/command/target_precompile_headers.rst | 21 |
12 files changed, 39 insertions, 52 deletions
diff --git a/Help/command/GENEX_NOTE.txt b/Help/command/GENEX_NOTE.txt new file mode 100644 index 0000000..4a7906c --- /dev/null +++ b/Help/command/GENEX_NOTE.txt @@ -0,0 +1,6 @@ +.. |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| diff --git a/Help/command/add_compile_definitions.rst b/Help/command/add_compile_definitions.rst index 206cf99..ad1fc43 100644 --- a/Help/command/add_compile_definitions.rst +++ b/Help/command/add_compile_definitions.rst @@ -21,10 +21,8 @@ Function-style definitions are not supported. CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values). -Arguments to ``add_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. +.. |command_name| replace:: ``add_compile_definitions`` +.. include:: GENEX_NOTE.txt See Also ^^^^^^^^ diff --git a/Help/command/add_compile_options.rst b/Help/command/add_compile_options.rst index 6ae7efb..ad65357 100644 --- a/Help/command/add_compile_options.rst +++ b/Help/command/add_compile_options.rst @@ -14,10 +14,8 @@ directory and below. Arguments ^^^^^^^^^ -Arguments to ``add_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. +.. |command_name| replace:: ``add_compile_options`` +.. include:: GENEX_NOTE.txt .. include:: OPTIONS_SHELL.txt diff --git a/Help/command/add_link_options.rst b/Help/command/add_link_options.rst index f799f4b..c09e106 100644 --- a/Help/command/add_link_options.rst +++ b/Help/command/add_link_options.rst @@ -23,10 +23,8 @@ exist to add libraries (:command:`target_link_libraries` or since they do not use a linker. To add archiver or MSVC librarian flags, see the :prop_tgt:`STATIC_LIBRARY_OPTIONS` target property. -Arguments to ``add_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. +.. |command_name| replace:: ``add_link_options`` +.. include:: GENEX_NOTE.txt .. include:: DEVICE_LINK_OPTIONS.txt diff --git a/Help/command/include_directories.rst b/Help/command/include_directories.rst index 9d613bf..d2948ed 100644 --- a/Help/command/include_directories.rst +++ b/Help/command/include_directories.rst @@ -29,10 +29,8 @@ Signalling this setting might achieve effects such as the compiler skipping warnings, or these fixed-install system files not being considered in dependency calculations - see compiler docs. -Arguments to ``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. +.. |command_name| replace:: ``include_directories`` +.. include:: GENEX_NOTE.txt .. note:: diff --git a/Help/command/target_compile_definitions.rst b/Help/command/target_compile_definitions.rst index d4bb6e8..2290efb 100644 --- a/Help/command/target_compile_definitions.rst +++ b/Help/command/target_compile_definitions.rst @@ -25,10 +25,8 @@ same ``<target>`` append items in the order called. .. versionadded:: 3.11 Allow setting ``INTERFACE`` items on :ref:`IMPORTED targets <Imported Targets>`. -Arguments to ``target_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. +.. |command_name| replace:: ``target_compile_definitions`` +.. include:: GENEX_NOTE.txt Any leading ``-D`` on an item will be removed. Empty items are ignored. For example, the following are all equivalent: diff --git a/Help/command/target_compile_features.rst b/Help/command/target_compile_features.rst index 82212a4..531af81 100644 --- a/Help/command/target_compile_features.rst +++ b/Help/command/target_compile_features.rst @@ -30,11 +30,11 @@ The named ``<target>`` must have been created by a command such as :command:`add_executable` or :command:`add_library` and must not be an :ref:`ALIAS target <Alias Targets>`. -Arguments to ``target_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. +.. |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:: GENEX_NOTE.txt + :start-line: 1 See Also ^^^^^^^^ diff --git a/Help/command/target_compile_options.rst b/Help/command/target_compile_options.rst index 2bcc4d7..8f13f45 100644 --- a/Help/command/target_compile_options.rst +++ b/Help/command/target_compile_options.rst @@ -32,10 +32,8 @@ The following arguments specify compile options. Repeated calls for the same .. versionadded:: 3.11 Allow setting ``INTERFACE`` items on :ref:`IMPORTED targets <Imported Targets>`. -Arguments to ``target_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. +.. |command_name| replace:: ``target_compile_options`` +.. include:: GENEX_NOTE.txt .. include:: OPTIONS_SHELL.txt diff --git a/Help/command/target_include_directories.rst b/Help/command/target_include_directories.rst index 02e13f9..2a410ec 100644 --- a/Help/command/target_include_directories.rst +++ b/Help/command/target_include_directories.rst @@ -40,10 +40,8 @@ If ``SYSTEM`` is used together with ``PUBLIC`` or ``INTERFACE``, the :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` target property will be populated with the specified directories. -Arguments to ``target_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. +.. |command_name| replace:: ``target_include_directories`` +.. include:: GENEX_NOTE.txt Specified include directories may be absolute paths or relative paths. A relative path will be interpreted as relative to the current source diff --git a/Help/command/target_link_directories.rst b/Help/command/target_link_directories.rst index 50dfd9e..2854c96 100644 --- a/Help/command/target_link_directories.rst +++ b/Help/command/target_link_directories.rst @@ -34,10 +34,8 @@ calls for the same ``<target>`` append items in the order called. If ``BEFORE`` is specified, the content will be prepended to the relevant property instead of being appended. -Arguments to ``target_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. +.. |command_name| replace:: ``target_link_directories`` +.. include:: GENEX_NOTE.txt .. note:: diff --git a/Help/command/target_link_options.rst b/Help/command/target_link_options.rst index 211d74d..0d026f2 100644 --- a/Help/command/target_link_options.rst +++ b/Help/command/target_link_options.rst @@ -42,10 +42,8 @@ The following arguments specify link options. Repeated calls for the same .. note:: :ref:`IMPORTED targets <Imported Targets>` only support ``INTERFACE`` items. -Arguments to ``target_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. +.. |command_name| replace:: ``target_link_options`` +.. include:: GENEX_NOTE.txt .. include:: DEVICE_LINK_OPTIONS.txt diff --git a/Help/command/target_precompile_headers.rst b/Help/command/target_precompile_headers.rst index a204dd1..8e5c0e9 100644 --- a/Help/command/target_precompile_headers.rst +++ b/Help/command/target_precompile_headers.rst @@ -70,17 +70,16 @@ included by absolute path. For example: <unordered_map> ) -Arguments to ``target_precompile_headers()`` may use "generator expressions" -with the syntax ``$<...>``. -See the :manual:`cmake-generator-expressions(7)` manual for available -expressions. -The :genex:`$<COMPILE_LANGUAGE:...>` 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: +.. |command_name| replace:: ``target_compile_features`` +.. |more_see_also| replace:: The :genex:`$<COMPILE_LANGUAGE:...>` 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:: GENEX_NOTE.txt + :start-line: 1 .. code-block:: cmake |