Help: Use CMake highlighting for command synopsis

Most of CMake commands use it. Fix a few of them to do the same.
This commit is contained in:
Alex Turbov
2022-11-06 06:49:09 +04:00
parent c356a94512
commit 8c6274326d
29 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0036`.
Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead. Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead.
:: .. code-block:: cmake
build_name(variable) build_name(variable)
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_build
Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_build([BUILD <build-dir>] [APPEND] ctest_build([BUILD <build-dir>] [APPEND]
[CONFIGURATION <config>] [CONFIGURATION <config>]
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_configure
Perform the :ref:`CTest Configure Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Configure Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_configure([BUILD <build-dir>] [SOURCE <source-dir>] [APPEND] ctest_configure([BUILD <build-dir>] [SOURCE <source-dir>] [APPEND]
[OPTIONS <options>] [RETURN_VALUE <result-var>] [QUIET] [OPTIONS <options>] [RETURN_VALUE <result-var>] [QUIET]
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_coverage
Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_coverage([BUILD <build-dir>] [APPEND] ctest_coverage([BUILD <build-dir>] [APPEND]
[LABELS <label>...] [LABELS <label>...]
@@ -3,9 +3,9 @@ ctest_empty_binary_directory
empties the binary directory empties the binary directory
:: .. code-block:: cmake
ctest_empty_binary_directory( directory ) ctest_empty_binary_directory(<directory>)
Removes a binary directory. This command will perform some checks Removes a binary directory. This command will perform some checks
prior to deleting the directory in an attempt to avoid malicious or prior to deleting the directory in an attempt to avoid malicious or
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_memcheck
Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_memcheck([BUILD <build-dir>] [APPEND] ctest_memcheck([BUILD <build-dir>] [APPEND]
[START <start-number>] [START <start-number>]
+2 -2
View File
@@ -3,9 +3,9 @@ ctest_read_custom_files
read CTestCustom files. read CTestCustom files.
:: .. code-block:: cmake
ctest_read_custom_files( directory ... ) ctest_read_custom_files(<directory>...)
Read all the CTestCustom.ctest or CTestCustom.cmake files from the Read all the CTestCustom.ctest or CTestCustom.cmake files from the
given directory. given directory.
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_run_script
runs a :option:`ctest -S` script runs a :option:`ctest -S` script
:: .. code-block:: cmake
ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 ctest_run_script([NEW_PROCESS] script_file_name script_file_name1
script_file_name2 ... [RETURN_VALUE var]) script_file_name2 ... [RETURN_VALUE var])
+2 -2
View File
@@ -3,13 +3,13 @@ ctest_sleep
sleeps for some amount of time sleeps for some amount of time
:: .. code-block:: cmake
ctest_sleep(<seconds>) ctest_sleep(<seconds>)
Sleep for given number of seconds. Sleep for given number of seconds.
:: .. code-block:: cmake
ctest_sleep(<time1> <duration> <time2>) ctest_sleep(<time1> <duration> <time2>)
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_start
Starts the testing for a given model Starts the testing for a given model
:: .. code-block:: cmake
ctest_start(<model> [<source> [<binary>]] [GROUP <group>] [QUIET]) ctest_start(<model> [<source> [<binary>]] [GROUP <group>] [QUIET])
+2 -2
View File
@@ -3,7 +3,7 @@ ctest_submit
Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_submit([PARTS <part>...] [FILES <file>...] ctest_submit([PARTS <part>...] [FILES <file>...]
[SUBMIT_URL <url>] [SUBMIT_URL <url>]
@@ -96,7 +96,7 @@ Submit to CDash Upload API
.. versionadded:: 3.2 .. versionadded:: 3.2
:: .. code-block:: cmake
ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>] ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
[SUBMIT_URL <url>] [SUBMIT_URL <url>]
+2 -2
View File
@@ -3,7 +3,7 @@ ctest_test
Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_test([BUILD <build-dir>] [APPEND] ctest_test([BUILD <build-dir>] [APPEND]
[START <start-number>] [START <start-number>]
@@ -30,7 +30,7 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
) )
.. ..
_note: If updating the argument list here, please also update the argument NOTE If updating the argument list here, please also update the argument
list documentation for :command:`ctest_memcheck` as well. list documentation for :command:`ctest_memcheck` as well.
Run tests in the project build tree and store results in Run tests in the project build tree and store results in
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_update
Perform the :ref:`CTest Update Step` as a :ref:`Dashboard Client`. Perform the :ref:`CTest Update Step` as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_update([SOURCE <source-dir>] ctest_update([SOURCE <source-dir>]
[RETURN_VALUE <result-var>] [RETURN_VALUE <result-var>]
+1 -1
View File
@@ -3,7 +3,7 @@ ctest_upload
Upload files to a dashboard server as a :ref:`Dashboard Client`. Upload files to a dashboard server as a :ref:`Dashboard Client`.
:: .. code-block:: cmake
ctest_upload(FILES <file>... [QUIET] [CAPTURE_CMAKE_ERROR <result-var>]) ctest_upload(FILES <file>... [QUIET] [CAPTURE_CMAKE_ERROR <result-var>])
+1 -1
View File
@@ -8,7 +8,7 @@ exec_program
Run an executable program during the processing of the CMakeList.txt Run an executable program during the processing of the CMakeList.txt
file. file.
:: .. code-block:: cmake
exec_program(Executable [directory in which to run] exec_program(Executable [directory in which to run]
[ARGS <arguments to executable>] [ARGS <arguments to executable>]
+1 -1
View File
@@ -15,7 +15,7 @@ The old-style library dependencies file does not take into account
per-configuration names of libraries or the per-configuration names of libraries or the
:prop_tgt:`LINK_INTERFACE_LIBRARIES` target property. :prop_tgt:`LINK_INTERFACE_LIBRARIES` target property.
:: .. code-block:: cmake
export_library_dependencies(<file> [APPEND]) export_library_dependencies(<file> [APPEND])
+3 -3
View File
@@ -11,7 +11,7 @@ directly replaced by the ``FILES`` form of the :command:`install`
command. The regexp form can be expressed more clearly using the ``GLOB`` command. The regexp form can be expressed more clearly using the ``GLOB``
form of the :command:`file` command. form of the :command:`file` command.
:: .. code-block:: cmake
install_files(<dir> extension file file ...) install_files(<dir> extension file file ...)
@@ -23,14 +23,14 @@ removed first. This is useful for providing lists of source files
such as foo.cxx when you want the corresponding foo.h to be installed. such as foo.cxx when you want the corresponding foo.h to be installed.
A typical extension is ``.h``. A typical extension is ``.h``.
:: .. code-block:: cmake
install_files(<dir> regexp) install_files(<dir> regexp)
Any files in the current source directory that match the regular Any files in the current source directory that match the regular
expression will be installed. expression will be installed.
:: .. code-block:: cmake
install_files(<dir> FILES file file ...) install_files(<dir> FILES file file ...)
+2 -2
View File
@@ -11,7 +11,7 @@ directly replaced by the ``PROGRAMS`` form of the :command:`install`
command. The regexp form can be expressed more clearly using the ``GLOB`` command. The regexp form can be expressed more clearly using the ``GLOB``
form of the :command:`file` command. form of the :command:`file` command.
:: .. code-block:: cmake
install_programs(<dir> file1 file2 [file3 ...]) install_programs(<dir> file1 file2 [file3 ...])
install_programs(<dir> FILES file1 [file2 ...]) install_programs(<dir> FILES file1 [file2 ...])
@@ -20,7 +20,7 @@ Create rules to install the listed programs into the given directory.
Use the ``FILES`` argument to guarantee that the file list version of the Use the ``FILES`` argument to guarantee that the file list version of the
command will be used even when there is only one argument. command will be used even when there is only one argument.
:: .. code-block:: cmake
install_programs(<dir> regexp) install_programs(<dir> regexp)
+1 -1
View File
@@ -8,7 +8,7 @@ install_targets
This command has been superseded by the :command:`install` command. It is This command has been superseded by the :command:`install` command. It is
provided for compatibility with older CMake code. provided for compatibility with older CMake code.
:: .. code-block:: cmake
install_targets(<dir> [RUNTIME_DIRECTORY dir] target target) install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
+2 -2
View File
@@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0031`.
Load a command into a running CMake. Load a command into a running CMake.
:: .. code-block:: cmake
load_command(COMMAND_NAME <loc1> [loc2 ...]) load_command(COMMAND_NAME <loc1> [loc2 ...])
@@ -15,7 +15,7 @@ added to the set of available CMake commands. Usually,
:command:`try_compile` is used before this command to compile the :command:`try_compile` is used before this command to compile the
module. If the command is successfully loaded a variable named module. If the command is successfully loaded a variable named
:: .. code-block:: cmake
CMAKE_LOADED_COMMAND_<COMMAND_NAME> CMAKE_LOADED_COMMAND_<COMMAND_NAME>
+1 -1
View File
@@ -5,7 +5,7 @@ make_directory
Use the :command:`file(MAKE_DIRECTORY)` command instead. Use the :command:`file(MAKE_DIRECTORY)` command instead.
:: .. code-block:: cmake
make_directory(directory) make_directory(directory)
+1 -1
View File
@@ -9,7 +9,7 @@ This command exists only because ancient CMake versions provided it.
CMake handles preprocessor dependency scanning automatically using a CMake handles preprocessor dependency scanning automatically using a
more advanced scanner. more advanced scanner.
:: .. code-block:: cmake
output_required_files(srcfile outputfile) output_required_files(srcfile outputfile)
+1 -1
View File
@@ -5,7 +5,7 @@ remove
Use the :command:`list(REMOVE_ITEM)` command instead. Use the :command:`list(REMOVE_ITEM)` command instead.
:: .. code-block:: cmake
remove(VAR VALUE VALUE ...) remove(VAR VALUE VALUE ...)
+1 -1
View File
@@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0029`.
Does nothing. Does nothing.
:: .. code-block:: cmake
subdir_depends(subdir dep1 dep2 ...) subdir_depends(subdir dep1 dep2 ...)
+1 -1
View File
@@ -7,7 +7,7 @@ subdirs
Add a list of subdirectories to the build. Add a list of subdirectories to the build.
:: .. code-block:: cmake
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...] subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
[PREORDER] ) [PREORDER] )
+1 -1
View File
@@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0030`.
Copy mesa headers for use in combination with system GL. Copy mesa headers for use in combination with system GL.
:: .. code-block:: cmake
use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY) use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)
+1 -1
View File
@@ -5,7 +5,7 @@ Disallowed since version 3.0. See CMake Policy :policy:`CMP0034`.
Specify the source tree of a third-party utility. Specify the source tree of a third-party utility.
:: .. code-block:: cmake
utility_source(cache_entry executable_name utility_source(cache_entry executable_name
path_to_source [file1 file2 ...]) path_to_source [file1 file2 ...])
+1 -1
View File
@@ -7,7 +7,7 @@ Use the :command:`if` command instead.
Assert satisfaction of an option's required variables. Assert satisfaction of an option's required variables.
:: .. code-block:: cmake
variable_requires(TEST_VARIABLE RESULT_VARIABLE variable_requires(TEST_VARIABLE RESULT_VARIABLE
REQUIRED_VARIABLE1 REQUIRED_VARIABLE1
+1 -1
View File
@@ -5,7 +5,7 @@ write_file
Use the :command:`file(WRITE)` command instead. Use the :command:`file(WRITE)` command instead.
:: .. code-block:: cmake
write_file(filename "message to write"... [APPEND]) write_file(filename "message to write"... [APPEND])