diff --git a/Help/command/DEVICE_LINK_OPTIONS.txt b/Help/command/DEVICE_LINK_OPTIONS.txt index 3d50208163..878754ddfd 100644 --- a/Help/command/DEVICE_LINK_OPTIONS.txt +++ b/Help/command/DEVICE_LINK_OPTIONS.txt @@ -7,8 +7,6 @@ Host And Device Specific Link Options :prop_tgt:`CUDA_RESOLVE_DEVICE_SYMBOLS` properties and policy :policy:`CMP0105`, the raw options will be delivered to the host and device link steps (wrapped in ``-Xcompiler`` or equivalent for device link). Options wrapped with - ``$`` - :manual:`generator expression ` will be used - only for the device link step. Options wrapped with ``$`` - :manual:`generator expression ` will be used - only for the host link step. + :genex:`$` generator expression will be used + only for the device link step. Options wrapped with :genex:`$` + generator expression will be used only for the host link step. diff --git a/Help/command/GENEX_NOTE.txt b/Help/command/GENEX_NOTE.txt new file mode 100644 index 0000000000..4a7906ce95 --- /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 48e33be63f..ad1fc43427 100644 --- a/Help/command/add_compile_definitions.rst +++ b/Help/command/add_compile_definitions.rst @@ -21,7 +21,10 @@ 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 +^^^^^^^^ + +* The command :command:`target_compile_definitions` adds target-specific definitions. diff --git a/Help/command/add_compile_options.rst b/Help/command/add_compile_options.rst index 36f403c8ae..ad653573d5 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 @@ -40,12 +38,12 @@ this command is in a compiler-specific conditional clause: See Also ^^^^^^^^ -This command can be used to add any options. However, for -adding preprocessor definitions and include directories it is recommended -to use the more specific commands :command:`add_compile_definitions` -and :command:`include_directories`. +* This command can be used to add any options. However, for + adding preprocessor definitions and include directories it is recommended + to use the more specific commands :command:`add_compile_definitions` + and :command:`include_directories`. -The command :command:`target_compile_options` adds target-specific options. +* The command :command:`target_compile_options` adds target-specific options. -The source file property :prop_sf:`COMPILE_OPTIONS` adds options to one -source file. +* The source file property :prop_sf:`COMPILE_OPTIONS` adds options to one + source file. diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 99adc85c12..a999c2d0ef 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -490,3 +490,8 @@ Ninja Multi-Config ``add_custom_command`` supports the :generator:`Ninja Multi-Config` generator's cross-config capabilities. See the generator documentation for more information. + +See Also +^^^^^^^^ + +* :command:`add_custom_target` diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index d8882ca99b..ec02ee2050 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -181,3 +181,8 @@ Ninja Multi-Config ``add_custom_target`` supports the :generator:`Ninja Multi-Config` generator's cross-config capabilities. See the generator documentation for more information. + +See Also +^^^^^^^^ + +* :command:`add_custom_command` diff --git a/Help/command/add_definitions.rst b/Help/command/add_definitions.rst index fe69188363..5c1f7b43bd 100644 --- a/Help/command/add_definitions.rst +++ b/Help/command/add_definitions.rst @@ -1,7 +1,7 @@ add_definitions --------------- -Add -D define flags to the compilation of source files. +Add ``-D`` define flags to the compilation of source files. .. code-block:: cmake @@ -31,5 +31,8 @@ backwards compatibility. See documentation of the properties for details on adding preprocessor definitions to specific scopes and configurations. -See the :manual:`cmake-buildsystem(7)` manual for more on defining -buildsystem properties. +See Also +^^^^^^^^ + +* The :manual:`cmake-buildsystem(7)` manual for more on defining + buildsystem properties. diff --git a/Help/command/add_dependencies.rst b/Help/command/add_dependencies.rst index 14c0183031..23cb4058f9 100644 --- a/Help/command/add_dependencies.rst +++ b/Help/command/add_dependencies.rst @@ -20,7 +20,12 @@ transitively in its place since the target itself does not build. .. versionadded:: 3.3 Allow adding dependencies to interface libraries. -See the ``DEPENDS`` option of :command:`add_custom_target` and -:command:`add_custom_command` commands for adding file-level -dependencies in custom rules. See the :prop_sf:`OBJECT_DEPENDS` -source file property to add file-level dependencies to object files. +See Also +^^^^^^^^ + +* The ``DEPENDS`` option of :command:`add_custom_target` and + :command:`add_custom_command` commands for adding file-level + dependencies in custom rules. + +* The :prop_sf:`OBJECT_DEPENDS` source file property to add + file-level dependencies to object files. diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst index dde94293e9..d9ea0da1a1 100644 --- a/Help/command/add_executable.rst +++ b/Help/command/add_executable.rst @@ -107,3 +107,8 @@ The ```` may not be used to modify properties of ````, that is, it may not be used as the operand of :command:`set_property`, :command:`set_target_properties`, :command:`target_link_libraries` etc. An ``ALIAS`` target may not be installed or exported. + +See Also +^^^^^^^^ + +* :command:`add_library` diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 7dc4365e6e..43cefca4e2 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -85,8 +85,8 @@ Creates an :ref:`Object Library `. An object library compiles source files but does not archive or link their object files into a library. Instead other targets created by :command:`add_library` or :command:`add_executable` may reference the objects using an expression of the -form ``$`` as a source, where ``objlib`` is the -object library name. For example: +form :genex:`$\ ` as a source, where +``objlib`` is the object library name. For example: .. code-block:: cmake @@ -101,7 +101,7 @@ They may contain custom commands generating such sources, but not ``PRE_BUILD``, ``PRE_LINK``, or ``POST_BUILD`` commands. Some native build systems (such as Xcode) may not like targets that have only object files, so consider adding at least one real source file to any target that references -``$``. +:genex:`$\ `. .. versionadded:: 3.12 Object libraries can be linked to with :command:`target_link_libraries`. @@ -261,3 +261,8 @@ to modify properties of ````, that is, it may not be used as the operand of :command:`set_property`, :command:`set_target_properties`, :command:`target_link_libraries` etc. An ``ALIAS`` target may not be installed or exported. + +See Also +^^^^^^^^ + +* :command:`add_executable` diff --git a/Help/command/add_link_options.rst b/Help/command/add_link_options.rst index f03e7c0e4c..c09e106908 100644 --- a/Help/command/add_link_options.rst +++ b/Help/command/add_link_options.rst @@ -23,13 +23,18 @@ 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 .. include:: OPTIONS_SHELL.txt .. include:: LINK_OPTIONS_LINKER.txt + +See Also +^^^^^^^^ + +* :command:`link_libraries` +* :command:`target_link_libraries` +* :command:`target_link_options` diff --git a/Help/command/block.rst b/Help/command/block.rst index dfd60d446d..a352e83651 100644 --- a/Help/command/block.rst +++ b/Help/command/block.rst @@ -71,6 +71,6 @@ inside the block. See Also ^^^^^^^^ - * :command:`endblock` - * :command:`return` - * :command:`cmake_policy` +* :command:`endblock` +* :command:`return` +* :command:`cmake_policy` diff --git a/Help/command/build_name.rst b/Help/command/build_name.rst index 2a1fbae627..5acf858300 100644 --- a/Help/command/build_name.rst +++ b/Help/command/build_name.rst @@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0036`. Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead. -:: +.. code-block:: cmake build_name(variable) diff --git a/Help/command/cmake_host_system_information.rst b/Help/command/cmake_host_system_information.rst index c84c5b57b7..76824ef1f0 100644 --- a/Help/command/cmake_host_system_information.rst +++ b/Help/command/cmake_host_system_information.rst @@ -17,7 +17,7 @@ Synopsis Query host system specific information ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:: +.. code-block:: cmake cmake_host_system_information(RESULT QUERY ...) diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst index d159770492..031bd5690e 100644 --- a/Help/command/cmake_minimum_required.rst +++ b/Help/command/cmake_minimum_required.rst @@ -79,3 +79,8 @@ invokes cmake_policy(VERSION 2.4[...]) which enables compatibility features for CMake 2.4 and lower. + +See Also +^^^^^^^^ + +* :command:`cmake_policy` diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst index 7c85da6103..0bb1d91bb1 100644 --- a/Help/command/cmake_parse_arguments.rst +++ b/Help/command/cmake_parse_arguments.rst @@ -113,3 +113,9 @@ interpreted as the beginning of the new option. E.g. is a keyword itself ``MY_INSTALL_DESTINATION`` will be empty (but added to ``MY_INSTALL_KEYWORDS_MISSING_VALUES``) and ``MY_INSTALL_OPTIONAL`` will therefore be set to ``TRUE``. + +See Also +^^^^^^^^ + +* :command:`function` +* :command:`macro` diff --git a/Help/command/cmake_path.rst b/Help/command/cmake_path.rst index eb7da07e38..4e6bedb650 100644 --- a/Help/command/cmake_path.rst +++ b/Help/command/cmake_path.rst @@ -237,7 +237,7 @@ The following forms of the ``GET`` subcommand each retrieve a different component or group of components from a path. See `Path Structure And Terminology`_ for the meaning of each path component. -:: +.. code-block:: cmake cmake_path(GET ROOT_NAME ) cmake_path(GET ROOT_DIRECTORY ) @@ -408,7 +408,7 @@ meaning of each path component. .. _HAS_RELATIVE_PART: .. _HAS_PARENT_PATH: -:: +.. code-block:: cmake cmake_path(HAS_ROOT_NAME ) cmake_path(HAS_ROOT_DIRECTORY ) @@ -432,7 +432,7 @@ Note the following special cases: .. _IS_ABSOLUTE: -:: +.. code-block:: cmake cmake_path(IS_ABSOLUTE ) @@ -446,7 +446,7 @@ false while ``HAS_ROOT_DIRECTORY`` can be true. .. _IS_RELATIVE: -:: +.. code-block:: cmake cmake_path(IS_RELATIVE ) @@ -454,7 +454,7 @@ This will store the opposite of ``IS_ABSOLUTE`` in ````. .. _IS_PREFIX: -:: +.. code-block:: cmake cmake_path(IS_PREFIX [NORMALIZE] ) @@ -476,7 +476,7 @@ are :ref:`normalized ` before the check. .. _Path COMPARE: .. _COMPARE: -:: +.. code-block:: cmake cmake_path(COMPARE EQUAL ) cmake_path(COMPARE NOT_EQUAL ) @@ -510,7 +510,7 @@ Modification .. _cmake_path-SET: -:: +.. code-block:: cmake cmake_path(SET [NORMALIZE] ) @@ -539,7 +539,7 @@ Output:: .. _APPEND: -:: +.. code-block:: cmake cmake_path(APPEND [...] [OUTPUT_VARIABLE ]) @@ -570,7 +570,7 @@ the following algorithm (pseudo-code) applies: .. _APPEND_STRING: -:: +.. code-block:: cmake cmake_path(APPEND_STRING [...] [OUTPUT_VARIABLE ]) @@ -579,7 +579,7 @@ Append all the ```` arguments to the ```` without adding any .. _REMOVE_FILENAME: -:: +.. code-block:: cmake cmake_path(REMOVE_FILENAME [OUTPUT_VARIABLE ]) @@ -609,7 +609,7 @@ Output:: .. _REPLACE_FILENAME: -:: +.. code-block:: cmake cmake_path(REPLACE_FILENAME [OUTPUT_VARIABLE ]) @@ -628,7 +628,7 @@ equivalent to the following: .. _REMOVE_EXTENSION: -:: +.. code-block:: cmake cmake_path(REMOVE_EXTENSION [LAST_ONLY] [OUTPUT_VARIABLE ]) @@ -637,7 +637,7 @@ Removes the :ref:`extension `, if any, from ````. .. _REPLACE_EXTENSION: -:: +.. code-block:: cmake cmake_path(REPLACE_EXTENSION [LAST_ONLY] [OUTPUT_VARIABLE ]) @@ -661,7 +661,7 @@ Generation .. _NORMAL_PATH: -:: +.. code-block:: cmake cmake_path(NORMAL_PATH [OUTPUT_VARIABLE ]) @@ -670,7 +670,7 @@ Normalize ```` according the steps described in :ref:`Normalization`. .. _cmake_path-RELATIVE_PATH: .. _RELATIVE_PATH: -:: +.. code-block:: cmake cmake_path(RELATIVE_PATH [BASE_DIRECTORY ] [OUTPUT_VARIABLE ]) @@ -686,7 +686,7 @@ as that used by C++ .. _ABSOLUTE_PATH: -:: +.. code-block:: cmake cmake_path(ABSOLUTE_PATH [BASE_DIRECTORY ] [NORMALIZE] [OUTPUT_VARIABLE ]) @@ -713,7 +713,7 @@ target platform when cross-compiling. .. _cmake_path-NATIVE_PATH: .. _NATIVE_PATH: -:: +.. code-block:: cmake cmake_path(NATIVE_PATH [NORMALIZE] ) @@ -727,7 +727,7 @@ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized .. _cmake_path-TO_CMAKE_PATH_LIST: .. _TO_CMAKE_PATH_LIST: -:: +.. code-block:: cmake cmake_path(CONVERT TO_CMAKE_PATH_LIST [NORMALIZE]) @@ -749,7 +749,7 @@ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized .. _cmake_path-TO_NATIVE_PATH_LIST: .. _TO_NATIVE_PATH_LIST: -:: +.. code-block:: cmake cmake_path(CONVERT TO_NATIVE_PATH_LIST [NORMALIZE]) @@ -788,7 +788,7 @@ Hashing .. _HASH: -:: +.. code-block:: cmake cmake_path(HASH ) diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst index 54fc548158..cde74a733c 100644 --- a/Help/command/cmake_policy.rst +++ b/Help/command/cmake_policy.rst @@ -150,3 +150,8 @@ use the pre-record policies when they are invoked. If the function or macro implementation sets policies, the changes automatically propagate up through callers until they reach the closest nested policy stack entry. + +See Also +^^^^^^^^ + +* :command:`cmake_minimum_required` diff --git a/Help/command/configure_file.rst b/Help/command/configure_file.rst index 1d81423515..7fa2941410 100644 --- a/Help/command/configure_file.rst +++ b/Help/command/configure_file.rst @@ -182,3 +182,8 @@ specify the output directory as an include directory: include_directories(${CMAKE_CURRENT_BINARY_DIR}) so that sources may include the header as ``#include ``. + +See Also +^^^^^^^^ + +* :command:`file(GENERATE)` diff --git a/Help/command/ctest_build.rst b/Help/command/ctest_build.rst index 8c81f2d526..bce17396e0 100644 --- a/Help/command/ctest_build.rst +++ b/Help/command/ctest_build.rst @@ -3,7 +3,7 @@ ctest_build Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`. -:: +.. code-block:: cmake ctest_build([BUILD ] [APPEND] [CONFIGURATION ] diff --git a/Help/command/ctest_configure.rst b/Help/command/ctest_configure.rst index 95712aac06..f23dd22244 100644 --- a/Help/command/ctest_configure.rst +++ b/Help/command/ctest_configure.rst @@ -3,7 +3,7 @@ ctest_configure Perform the :ref:`CTest Configure Step` as a :ref:`Dashboard Client`. -:: +.. code-block:: cmake ctest_configure([BUILD ] [SOURCE ] [APPEND] [OPTIONS ] [RETURN_VALUE ] [QUIET] diff --git a/Help/command/ctest_coverage.rst b/Help/command/ctest_coverage.rst index a6c643bbc5..319c97855c 100644 --- a/Help/command/ctest_coverage.rst +++ b/Help/command/ctest_coverage.rst @@ -3,7 +3,7 @@ ctest_coverage Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`. -:: +.. code-block:: cmake ctest_coverage([BUILD ] [APPEND] [LABELS