mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 05:38:24 -05:00
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:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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>]
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>]
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|||||||
@@ -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>)
|
||||||
|
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|
||||||
|
|||||||
@@ -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>]
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>]
|
||||||
|
|||||||
@@ -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>])
|
||||||
|
|
||||||
|
|||||||
@@ -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>]
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|
||||||
|
|||||||
@@ -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 ...)
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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 ...)
|
||||||
|
|
||||||
|
|||||||
@@ -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 ...)
|
||||||
|
|
||||||
|
|||||||
@@ -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] )
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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 ...])
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user