Browse Source

Help: Add _See Also_ sections to related CMake commands

Alex Turbov 3 years ago
parent
commit
65457e4fae
44 changed files with 311 additions and 43 deletions
  1. 5 0
      Help/command/add_compile_definitions.rst
  2. 7 7
      Help/command/add_compile_options.rst
  3. 5 0
      Help/command/add_custom_command.rst
  4. 5 0
      Help/command/add_custom_target.rst
  5. 6 3
      Help/command/add_definitions.rst
  6. 9 4
      Help/command/add_dependencies.rst
  7. 5 0
      Help/command/add_executable.rst
  8. 5 0
      Help/command/add_library.rst
  9. 7 0
      Help/command/add_link_options.rst
  10. 5 0
      Help/command/cmake_minimum_required.rst
  11. 6 0
      Help/command/cmake_parse_arguments.rst
  12. 5 0
      Help/command/cmake_policy.rst
  13. 5 0
      Help/command/configure_file.rst
  14. 6 0
      Help/command/define_property.rst
  15. 1 0
      Help/command/function.rst
  16. 5 2
      Help/command/get_cmake_property.rst
  17. 6 1
      Help/command/get_directory_property.rst
  18. 5 0
      Help/command/get_filename_component.rst
  19. 6 0
      Help/command/get_property.rst
  20. 7 2
      Help/command/get_source_file_property.rst
  21. 6 2
      Help/command/get_target_property.rst
  22. 5 1
      Help/command/get_test_property.rst
  23. 5 0
      Help/command/include_directories.rst
  24. 6 0
      Help/command/link_directories.rst
  25. 6 0
      Help/command/macro.rst
  26. 5 0
      Help/command/message.rst
  27. 1 0
      Help/command/return.rst
  28. 5 0
      Help/command/set.rst
  29. 7 0
      Help/command/set_directory_properties.rst
  30. 8 3
      Help/command/set_property.rst
  31. 8 3
      Help/command/set_source_files_properties.rst
  32. 6 2
      Help/command/set_target_properties.rst
  33. 6 2
      Help/command/set_tests_properties.rst
  34. 13 0
      Help/command/target_compile_definitions.rst
  35. 12 0
      Help/command/target_compile_features.rst
  36. 13 6
      Help/command/target_compile_options.rst
  37. 13 0
      Help/command/target_include_directories.rst
  38. 13 0
      Help/command/target_link_directories.rst
  39. 12 0
      Help/command/target_link_libraries.rst
  40. 12 0
      Help/command/target_link_options.rst
  41. 14 5
      Help/command/target_precompile_headers.rst
  42. 14 0
      Help/command/target_sources.rst
  43. 5 0
      Help/command/try_compile.rst
  44. 5 0
      Help/command/unset.rst

+ 5 - 0
Help/command/add_compile_definitions.rst

@@ -25,3 +25,8 @@ 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.
+
+See Also
+^^^^^^^^
+
+* The command :command:`target_compile_definitions` adds target-specific definitions.

+ 7 - 7
Help/command/add_compile_options.rst

@@ -40,12 +40,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.

+ 5 - 0
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`

+ 5 - 0
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`

+ 6 - 3
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.

+ 9 - 4
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.

+ 5 - 0
Help/command/add_executable.rst

@@ -107,3 +107,8 @@ The ``<name>`` may not be used to modify properties of ``<target>``, 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`

+ 5 - 0
Help/command/add_library.rst

@@ -261,3 +261,8 @@ to modify properties of ``<target>``, 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`

+ 7 - 0
Help/command/add_link_options.rst

@@ -33,3 +33,10 @@ manual for more on defining buildsystem properties.
 .. include:: OPTIONS_SHELL.txt
 
 .. include:: LINK_OPTIONS_LINKER.txt
+
+See Also
+^^^^^^^^
+
+* :command:`link_libraries`
+* :command:`target_link_libraries`
+* :command:`target_link_options`

+ 5 - 0
Help/command/cmake_minimum_required.rst

@@ -79,3 +79,8 @@ invokes
   cmake_policy(VERSION 2.4[...<max>])
 
 which enables compatibility features for CMake 2.4 and lower.
+
+See Also
+^^^^^^^^
+
+* :command:`cmake_policy`

+ 6 - 0
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`

+ 5 - 0
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`

+ 5 - 0
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 <foo.h>``.
+
+See Also
+^^^^^^^^
+
+* :command:`file(GENERATE)`

+ 6 - 0
Help/command/define_property.rst

@@ -73,3 +73,9 @@ project via corresponding options to the :command:`get_property` command.
   with ``CMAKE_`` or ``_CMAKE_``. The property name must contain at least one
   underscore. It is recommended that the property name have a prefix specific
   to the project.
+
+See Also
+^^^^^^^^
+
+* :command:`get_property`
+* :command:`set_property`

+ 1 - 0
Help/command/function.rst

@@ -77,5 +77,6 @@ extra argument.
 See Also
 ^^^^^^^^
 
+* :command:`cmake_parse_arguments`
 * :command:`endfunction`
 * :command:`return`

+ 5 - 2
Help/command/get_cmake_property.rst

@@ -12,9 +12,12 @@ the ``<property>`` is stored in the variable ``<var>``.
 If the property is not found, ``<var>`` will be set to ``NOTFOUND``.
 See the :manual:`cmake-properties(7)` manual for available properties.
 
-See also the :command:`get_property` command ``GLOBAL`` option.
-
 In addition to global properties, this command (for historical reasons)
 also supports the :prop_dir:`VARIABLES` and :prop_dir:`MACROS` directory
 properties.  It also supports a special ``COMPONENTS`` global property that
 lists the components given to the :command:`install` command.
+
+See Also
+^^^^^^^^
+
+* the :command:`get_property` command ``GLOBAL`` option

+ 6 - 1
Help/command/get_directory_property.rst

@@ -33,4 +33,9 @@ the search will chain to a parent scope as described for the
 Get a variable definition from a directory.  This form is useful to
 get a variable definition from another directory.
 
-See also the more general :command:`get_property` command.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* the more general :command:`get_property` command

+ 5 - 0
Help/command/get_filename_component.rst

@@ -69,3 +69,8 @@ left as a full path.  If ``PROGRAM_ARGS`` is present with ``PROGRAM``, then
 any command-line arguments present in the ``<FileName>`` string are split
 from the program name and stored in ``<arg_var>``.  This is used to
 separate a program name from its arguments in a command line string.
+
+See Also
+^^^^^^^^
+
+* :command:`cmake_path`

+ 6 - 0
Help/command/get_property.rst

@@ -99,3 +99,9 @@ documentation is requested for a property that has not been defined
 
   The :prop_sf:`GENERATED` source file property may be globally visible.
   See its documentation for details.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* :command:`set_property`

+ 7 - 2
Help/command/get_source_file_property.rst

@@ -39,9 +39,14 @@ Use :command:`set_source_files_properties` to set property values.  Source
 file properties usually control how the file is built. One property that is
 always there is :prop_sf:`LOCATION`.
 
-See also the more general :command:`get_property` command.
-
 .. note::
 
   The :prop_sf:`GENERATED` source file property may be globally visible.
   See its documentation for details.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* the more general :command:`get_property` command
+* :command:`set_source_files_properties`

+ 6 - 2
Help/command/get_target_property.rst

@@ -22,6 +22,10 @@ query the target instead.  This command can get properties for any
 target so far created.  The targets do not need to be in the current
 ``CMakeLists.txt`` file.
 
-See also the more general :command:`get_property` command.
+See Also
+^^^^^^^^
 
-See :ref:`Target Properties` for the list of properties known to CMake.
+* :command:`define_property`
+* the more general :command:`get_property` command
+* :command:`set_target_properties`
+* :ref:`Target Properties` for the list of properties known to CMake

+ 5 - 1
Help/command/get_test_property.rst

@@ -19,4 +19,8 @@ an empty string.
 For a list of standard properties you can type
 :option:`cmake --help-property-list`.
 
-See also the more general :command:`get_property` command.
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* the more general :command:`get_property` command

+ 5 - 0
Help/command/include_directories.rst

@@ -39,3 +39,8 @@ manual for more on defining buildsystem properties.
   Prefer the :command:`target_include_directories` command to add include
   directories to individual targets and optionally propagate/export them
   to dependents.
+
+See Also
+^^^^^^^^
+
+* :command:`target_include_directories`

+ 6 - 0
Help/command/link_directories.rst

@@ -53,3 +53,9 @@ The command will apply only to targets created after it is called.
   where possible by using the :command:`target_link_directories` command
   rather than ``link_directories()``.  The target-specific command can also
   control how the search directories propagate to other dependent targets.
+
+See Also
+^^^^^^^^
+
+* :command:`target_link_directories`
+* :command:`target_link_libraries`

+ 6 - 0
Help/command/macro.rst

@@ -149,3 +149,9 @@ existing variable instead of the arguments. For example:
 Will loop over ``a;b;c`` and not over ``x;y;z`` as one might have expected.
 If you want true CMake variables and/or better CMake scope control you
 should look at the function command.
+
+See Also
+^^^^^^^^
+
+* :command:`cmake_parse_arguments`
+* :command:`endmacro`

+ 5 - 0
Help/command/message.rst

@@ -193,3 +193,8 @@ Output from the above would appear something like the following::
   --   Finding partB
   --   Finding partB - not found
   -- Finding my things - missing components: B
+
+See Also
+^^^^^^^^
+
+* :command:`cmake_language(GET_MESSAGE_LOG_LEVEL)`

+ 1 - 0
Help/command/return.rst

@@ -52,3 +52,4 @@ See Also
 ^^^^^^^^
 
 * :command:`block`
+* :command:`function`

+ 5 - 0
Help/command/set.rst

@@ -111,3 +111,8 @@ environment variable.
 
 Arguments after ``<value>`` are ignored. If extra arguments are found,
 then an author warning is issued.
+
+See Also
+^^^^^^^^
+
+* :command:`unset`

+ 7 - 0
Help/command/set_directory_properties.rst

@@ -13,3 +13,10 @@ See also the :command:`set_property(DIRECTORY)` command.
 
 See :ref:`Directory Properties` for the list of properties known to CMake
 and their individual documentation for the behavior of each property.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* :command:`get_directory_property`
+* the more general :command:`set_property` command

+ 8 - 3
Help/command/set_property.rst

@@ -107,10 +107,15 @@ finding the initial value to append to.  If the property is not already
 directly set in the nominated scope, the command will behave as though
 ``APPEND`` or ``APPEND_STRING`` had not been given.
 
-See the :manual:`cmake-properties(7)` manual for a list of properties
-in each scope.
-
 .. note::
 
   The :prop_sf:`GENERATED` source file property may be globally visible.
   See its documentation for details.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* :command:`get_property`
+* The :manual:`cmake-properties(7)` manual for a list of properties
+  in each scope.

+ 8 - 3
Help/command/set_source_files_properties.rst

@@ -34,10 +34,15 @@ list.
 Use :command:`get_source_file_property` to get property values.
 See also the :command:`set_property(SOURCE)` command.
 
-See :ref:`Source File Properties` for the list of properties known
-to CMake.
-
 .. note::
 
   The :prop_sf:`GENERATED` source file property may be globally visible.
   See its documentation for details.
+
+See Also
+^^^^^^^^
+
+* :command:`define_property`
+* :command:`get_source_file_property`
+* :ref:`Source File Properties` for the list of properties known
+  to CMake

+ 6 - 2
Help/command/set_target_properties.rst

@@ -15,6 +15,10 @@ set next.  You can use any prop value pair you want and extract it
 later with the :command:`get_property` or :command:`get_target_property`
 command.
 
-See also the :command:`set_property(TARGET)` command.
+See Also
+^^^^^^^^
 
-See :ref:`Target Properties` for the list of properties known to CMake.
+* :command:`define_property`
+* :command:`get_target_property`
+* the more general :command:`set_property` command
+* :ref:`Target Properties` for the list of properties known to CMake

+ 6 - 2
Help/command/set_tests_properties.rst

@@ -14,6 +14,10 @@ Test property values may be specified using
 :manual:`generator expressions <cmake-generator-expressions(7)>`
 for tests created by the :command:`add_test(NAME)` signature.
 
-See also the :command:`set_property(TEST)` command.
+See Also
+^^^^^^^^
 
-See :ref:`Test Properties` for the list of properties known to CMake.
+* :command:`add_test`
+* :command:`define_property`
+* the more general :command:`set_property` command
+* :ref:`Target Properties` for the list of properties known to CMake

+ 13 - 0
Help/command/target_compile_definitions.rst

@@ -48,3 +48,16 @@ Definitions may optionally have values:
 
 Note that many compilers treat ``-DFOO`` as equivalent to ``-DFOO=1``, but
 other tools may not recognize this in all circumstances (e.g. IntelliSense).
+
+See Also
+^^^^^^^^
+
+* :command:`add_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 12 - 0
Help/command/target_compile_features.rst

@@ -35,3 +35,15 @@ 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.
+
+See Also
+^^^^^^^^
+
+* :command:`target_compile_definitions`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 13 - 6
Help/command/target_compile_options.rst

@@ -42,11 +42,18 @@ manual for more on defining buildsystem properties.
 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:`target_compile_definitions`
-and :command:`target_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:`target_compile_definitions`
+  and :command:`target_include_directories`.
 
-For directory-wide settings, there is the command :command:`add_compile_options`.
+* For directory-wide settings, there is the command :command:`add_compile_options`.
 
-For file-specific settings, there is the source file property :prop_sf:`COMPILE_OPTIONS`.
+* For file-specific settings, there is the source file property :prop_sf:`COMPILE_OPTIONS`.
+
+* :command:`target_compile_features`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 13 - 0
Help/command/target_include_directories.rst

@@ -74,3 +74,16 @@ Creating Relocatable Packages
 
 .. |INTERFACE_PROPERTY_LINK| replace:: :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES`
 .. include:: /include/INTERFACE_INCLUDE_DIRECTORIES_WARNING.txt
+
+See Also
+^^^^^^^^
+
+* :command:`include_directories`
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 13 - 0
Help/command/target_link_directories.rst

@@ -56,3 +56,16 @@ manual for more on defining buildsystem properties.
     that expect to be found via ``RPATH`` mechanisms, but some linkers
     are not able to fully decode those paths (e.g. due to the presence
     of things like ``$ORIGIN``).
+
+See Also
+^^^^^^^^
+
+* :command:`link_directories`
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 12 - 0
Help/command/target_link_libraries.rst

@@ -407,3 +407,15 @@ Creating Relocatable Packages
 
 .. |INTERFACE_PROPERTY_LINK| replace:: :prop_tgt:`INTERFACE_LINK_LIBRARIES`
 .. include:: /include/INTERFACE_LINK_LIBRARIES_WARNING.txt
+
+See Also
+^^^^^^^^
+
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 12 - 0
Help/command/target_link_options.rst

@@ -52,3 +52,15 @@ manual for more on defining buildsystem properties.
 .. include:: OPTIONS_SHELL.txt
 
 .. include:: LINK_OPTIONS_LINKER.txt
+
+See Also
+^^^^^^^^
+
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_precompile_headers`
+* :command:`target_sources`

+ 14 - 5
Help/command/target_precompile_headers.rst

@@ -118,8 +118,17 @@ the ``REUSE_FROM`` form is used.
 See Also
 ^^^^^^^^
 
-To disable precompile headers for specific targets, see the
-:prop_tgt:`DISABLE_PRECOMPILE_HEADERS` target property.
-
-To prevent precompile headers from being used when compiling a specific
-source file, see the :prop_sf:`SKIP_PRECOMPILE_HEADERS` source file property.
+* To disable precompile headers for specific targets, see the
+  :prop_tgt:`DISABLE_PRECOMPILE_HEADERS` target property.
+
+* To prevent precompile headers from being used when compiling a specific
+  source file, see the :prop_sf:`SKIP_PRECOMPILE_HEADERS` source file property.
+
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_sources`

+ 14 - 0
Help/command/target_sources.rst

@@ -202,3 +202,17 @@ Target properties related to include directories are also modified by
   of the file set is ``INTERFACE`` or ``PUBLIC``, all of the ``BASE_DIRS`` of
   the file set are wrapped in :genex:`$<BUILD_INTERFACE>` and appended to this
   property.
+
+See Also
+^^^^^^^^
+
+* :command:`add_executable`
+* :command:`add_library`
+* :command:`target_compile_definitions`
+* :command:`target_compile_features`
+* :command:`target_compile_options`
+* :command:`target_include_directories`
+* :command:`target_link_libraries`
+* :command:`target_link_directories`
+* :command:`target_link_options`
+* :command:`target_precompile_headers`

+ 5 - 0
Help/command/try_compile.rst

@@ -327,3 +327,8 @@ a build configuration.
   If :policy:`CMP0141` is set to ``NEW``, one can use
   :variable:`CMAKE_MSVC_DEBUG_INFORMATION_FORMAT` to specify the MSVC debug
   information format.
+
+See Also
+^^^^^^^^
+
+* :command:`try_run`

+ 5 - 0
Help/command/unset.rst

@@ -39,3 +39,8 @@ Subsequent calls of ``$ENV{<variable>}`` will return the empty string.
 This command affects only the current CMake process, not the process
 from which CMake was called, nor the system environment at large,
 nor the environment of subsequent build or test processes.
+
+See Also
+^^^^^^^^
+
+* :command:`set`