mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Help: Replace a bunch of more `--option to :option:` role
This commit is contained in:
@@ -510,7 +510,8 @@ into the given ``<output_variable>``.
|
|||||||
|
|
||||||
See :command:`message` for the possible logging levels.
|
See :command:`message` for the possible logging levels.
|
||||||
|
|
||||||
The current message logging level can be set either using the ``--log-level``
|
The current message logging level can be set either using the
|
||||||
|
:option:`--log-level <cmake --log-level>`
|
||||||
command line option of the :manual:`cmake(1)` program or using
|
command line option of the :manual:`cmake(1)` program or using
|
||||||
the :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable.
|
the :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable.
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,9 @@ The options are:
|
|||||||
While running tests in parallel, try not to start tests when they
|
While running tests in parallel, try not to start tests when they
|
||||||
may cause the CPU load to pass above a given threshold. If not
|
may cause the CPU load to pass above a given threshold. If not
|
||||||
specified the :variable:`CTEST_TEST_LOAD` variable will be checked,
|
specified the :variable:`CTEST_TEST_LOAD` variable will be checked,
|
||||||
and then the ``--test-load`` command-line argument to :manual:`ctest(1)`.
|
and then the :option:`--test-load <ctest --test-load>` command-line
|
||||||
See also the ``TestLoad`` setting in the :ref:`CTest Test Step`.
|
argument to :manual:`ctest(1)`. See also the ``TestLoad`` setting
|
||||||
|
in the :ref:`CTest Test Step`.
|
||||||
|
|
||||||
``REPEAT <mode>:<n>``
|
``REPEAT <mode>:<n>``
|
||||||
.. versionadded:: 3.17
|
.. versionadded:: 3.17
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ enabled.
|
|||||||
See policy :policy:`CMP0074`.
|
See policy :policy:`CMP0074`.
|
||||||
|
|
||||||
2. Search paths specified in cmake-specific cache variables. These
|
2. Search paths specified in cmake-specific cache variables. These
|
||||||
are intended to be used on the command line with a ``-DVAR=value``.
|
are intended to be used on the command line with a :option:`-DVAR=VALUE <cmake -D>`.
|
||||||
The values are interpreted as :ref:`semicolon-separated lists <CMake Language Lists>`.
|
The values are interpreted as :ref:`semicolon-separated lists <CMake Language Lists>`.
|
||||||
This can be skipped if ``NO_CMAKE_PATH`` is passed or by setting the
|
This can be skipped if ``NO_CMAKE_PATH`` is passed or by setting the
|
||||||
:variable:`CMAKE_FIND_USE_CMAKE_PATH` to ``FALSE``:
|
:variable:`CMAKE_FIND_USE_CMAKE_PATH` to ``FALSE``:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ relevant parent scope as described for the :command:`define_property`
|
|||||||
command and if still unable to find the property, ``VAR`` will be set to
|
command and if still unable to find the property, ``VAR`` will be set to
|
||||||
an empty string.
|
an empty string.
|
||||||
|
|
||||||
For a list of standard properties you can type ``cmake --help-property-list``.
|
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 the more general :command:`get_property` command.
|
||||||
|
|||||||
@@ -963,12 +963,12 @@ Generated Installation Script
|
|||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Use of this feature is not recommended. Please consider using the
|
Use of this feature is not recommended. Please consider using the
|
||||||
``--install`` argument of :manual:`cmake(1)` instead.
|
:option:`cmake --install` instead.
|
||||||
|
|
||||||
The ``install()`` command generates a file, ``cmake_install.cmake``, inside
|
The ``install()`` command generates a file, ``cmake_install.cmake``, inside
|
||||||
the build directory, which is used internally by the generated install target
|
the build directory, which is used internally by the generated install target
|
||||||
and by CPack. You can also invoke this script manually with ``cmake -P``. This
|
and by CPack. You can also invoke this script manually with
|
||||||
script accepts several variables:
|
:option:`cmake -P <cmake_P -P>`. This script accepts several variables:
|
||||||
|
|
||||||
``COMPONENT``
|
``COMPONENT``
|
||||||
Set this variable to install only a single CPack component as opposed to all
|
Set this variable to install only a single CPack component as opposed to all
|
||||||
|
|||||||
@@ -83,8 +83,9 @@ are sent to stderr and are not prefixed with hyphens. The
|
|||||||
:manual:`CMake GUI <cmake-gui(1)>` displays all messages in its log area.
|
:manual:`CMake GUI <cmake-gui(1)>` displays all messages in its log area.
|
||||||
The :manual:`curses interface <ccmake(1)>` shows ``STATUS`` to ``TRACE``
|
The :manual:`curses interface <ccmake(1)>` shows ``STATUS`` to ``TRACE``
|
||||||
messages one at a time on a status line and other messages in an
|
messages one at a time on a status line and other messages in an
|
||||||
interactive pop-up box. The ``--log-level`` command-line option to each of
|
interactive pop-up box. The :option:`--log-level <cmake --log-level>`
|
||||||
these tools can be used to control which messages will be shown.
|
command-line option to each of these tools can be used to control which
|
||||||
|
messages will be shown.
|
||||||
|
|
||||||
.. versionadded:: 3.17
|
.. versionadded:: 3.17
|
||||||
To make a log level persist between CMake runs, the
|
To make a log level persist between CMake runs, the
|
||||||
@@ -104,7 +105,7 @@ these tools can be used to control which messages will be shown.
|
|||||||
list variable to a dot-separated string. The message context will always
|
list variable to a dot-separated string. The message context will always
|
||||||
appear before any indenting content but after any automatically added leading
|
appear before any indenting content but after any automatically added leading
|
||||||
hyphens. By default, message context is not shown, it has to be explicitly
|
hyphens. By default, message context is not shown, it has to be explicitly
|
||||||
enabled by giving the :manual:`cmake <cmake(1)>` ``--log-context``
|
enabled by giving the :option:`cmake --log-context`
|
||||||
command-line option or by setting the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW`
|
command-line option or by setting the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW`
|
||||||
variable to true. See the :variable:`CMAKE_MESSAGE_CONTEXT` documentation for
|
variable to true. See the :variable:`CMAKE_MESSAGE_CONTEXT` documentation for
|
||||||
usage examples.
|
usage examples.
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ contain something like the following:
|
|||||||
The options are:
|
The options are:
|
||||||
|
|
||||||
``CMAKE_FLAGS <flags>...``
|
``CMAKE_FLAGS <flags>...``
|
||||||
Specify flags of the form ``-DVAR:TYPE=VALUE`` to be passed to
|
Specify flags of the form :option:`-DVAR:TYPE=VALUE <cmake -D>` to be passed
|
||||||
the ``cmake`` command-line used to drive the test build.
|
to the :manual:`cmake(1)` command-line used to drive the test build.
|
||||||
The above example shows how values for variables
|
The above example shows how values for variables
|
||||||
``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``, and ``LINK_LIBRARIES``
|
``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``, and ``LINK_LIBRARIES``
|
||||||
are used.
|
are used.
|
||||||
@@ -137,15 +137,16 @@ The options are:
|
|||||||
or :prop_tgt:`CUDA_EXTENSIONS` target property of the generated project.
|
or :prop_tgt:`CUDA_EXTENSIONS` target property of the generated project.
|
||||||
|
|
||||||
In this version all files in ``<bindir>/CMakeFiles/CMakeTmp`` will be
|
In this version all files in ``<bindir>/CMakeFiles/CMakeTmp`` will be
|
||||||
cleaned automatically. For debugging, ``--debug-trycompile`` can be
|
cleaned automatically. For debugging,
|
||||||
|
:option:`--debug-trycompile <cmake --debug-trycompile>` can be
|
||||||
passed to ``cmake`` to avoid this clean. However, multiple sequential
|
passed to ``cmake`` to avoid this clean. However, multiple sequential
|
||||||
``try_compile`` operations reuse this single output directory. If you use
|
``try_compile`` operations reuse this single output directory. If you use
|
||||||
``--debug-trycompile``, you can only debug one ``try_compile`` call at a time.
|
:option:`--debug-trycompile <cmake --debug-trycompile>`, you can only debug
|
||||||
The recommended procedure is to protect all ``try_compile`` calls in your
|
one ``try_compile`` call at a time. The recommended procedure is to protect
|
||||||
project by ``if(NOT DEFINED <resultVar>)`` logic, configure with cmake
|
all ``try_compile`` calls in your project by ``if(NOT DEFINED <resultVar>)``
|
||||||
all the way through once, then delete the cache entry associated with
|
logic, configure with cmake all the way through once, then delete the cache
|
||||||
the try_compile call of interest, and then re-run cmake again with
|
entry associated with the try_compile call of interest, and then re-run cmake
|
||||||
``--debug-trycompile``.
|
again with :option:`--debug-trycompile <cmake --debug-trycompile>`.
|
||||||
|
|
||||||
Other Behavior Settings
|
Other Behavior Settings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ information on how the test project is constructed to build the source file.
|
|||||||
The options are:
|
The options are:
|
||||||
|
|
||||||
``CMAKE_FLAGS <flags>...``
|
``CMAKE_FLAGS <flags>...``
|
||||||
Specify flags of the form ``-DVAR:TYPE=VALUE`` to be passed to
|
Specify flags of the form :option:`-DVAR:TYPE=VALUE <cmake -D>` to be passed
|
||||||
the ``cmake`` command-line used to drive the test build.
|
to the :manual:`cmake(1)` command-line used to drive the test build.
|
||||||
The example in :command:`try_compile` shows how values for variables
|
The example in :command:`try_compile` shows how values for variables
|
||||||
``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``, and ``LINK_LIBRARIES``
|
``INCLUDE_DIRECTORIES``, ``LINK_DIRECTORIES``, and ``LINK_LIBRARIES``
|
||||||
are used.
|
are used.
|
||||||
|
|||||||
@@ -14,5 +14,5 @@ variable is not set or has a value that evaluates to false, output is reported
|
|||||||
normally with each test having its own start and end lines logged to the
|
normally with each test having its own start and end lines logged to the
|
||||||
output.
|
output.
|
||||||
|
|
||||||
The ``--progress`` option to :manual:`ctest <ctest(1)>` overrides this
|
The :option:`--progress <ctest --progress>` option to :manual:`ctest <ctest(1)>`
|
||||||
environment variable if both are given.
|
overrides this environment variable if both are given.
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ The packaging tool may then construct the package from the content of the
|
|||||||
|
|
||||||
See the :variable:`CMAKE_INSTALL_PREFIX` variable to control the
|
See the :variable:`CMAKE_INSTALL_PREFIX` variable to control the
|
||||||
installation prefix when configuring a build tree. Or, when using
|
installation prefix when configuring a build tree. Or, when using
|
||||||
the :manual:`cmake(1)` command-line tool's ``--install`` mode,
|
the :manual:`cmake(1)` command-line tool's :option:`--install <cmake --install>`
|
||||||
one may specify a different prefix using the ``--prefix`` option.
|
mode, one may specify a different prefix using the
|
||||||
|
:option:`--prefix <cmake --prefix>` option.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ are intended to be run with ``ninja -f build-<Config>.ninja``. A
|
|||||||
:variable:`CMAKE_CONFIGURATION_TYPES`.
|
:variable:`CMAKE_CONFIGURATION_TYPES`.
|
||||||
|
|
||||||
``cmake --build . --config <Config>`` will always use ``build-<Config>.ninja``
|
``cmake --build . --config <Config>`` will always use ``build-<Config>.ninja``
|
||||||
to build. If no ``--config`` argument is specified, ``cmake --build .`` will
|
to build. If no :option:`--config <cmake --config>` argument is specified,
|
||||||
use ``build.ninja``.
|
:option:`cmake --build .<cmake --build>` will use ``build.ninja``.
|
||||||
|
|
||||||
Each ``build-<Config>.ninja`` file contains ``<target>`` targets as well as
|
Each ``build-<Config>.ninja`` file contains ``<target>`` targets as well as
|
||||||
``<target>:<Config>`` targets, where ``<Config>`` is the same as the
|
``<target>:<Config>`` targets, where ``<Config>`` is the same as the
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ does, and present the user with the presets listed in the file. Users should be
|
|||||||
able to see (and possibly edit) the CMake cache variables, environment
|
able to see (and possibly edit) the CMake cache variables, environment
|
||||||
variables, and command line options that are defined for a given preset. The
|
variables, and command line options that are defined for a given preset. The
|
||||||
IDE should then construct the list of appropriate :manual:`cmake(1)` command
|
IDE should then construct the list of appropriate :manual:`cmake(1)` command
|
||||||
line arguments based on these settings, rather than using the ``--preset=``
|
line arguments based on these settings, rather than using the
|
||||||
option directly. The ``--preset=`` option is intended only as a convenient
|
:option:`--preset= <cmake --preset>` option directly. The
|
||||||
|
:option:`--preset= <cmake --preset>` option is intended only as a convenient
|
||||||
frontend for command line users, and should not be used by the IDE.
|
frontend for command line users, and should not be used by the IDE.
|
||||||
|
|
||||||
For example, if a preset named ``ninja`` specifies ``Ninja`` as the generator
|
For example, if a preset named ``ninja`` specifies ``Ninja`` as the generator
|
||||||
@@ -109,8 +110,9 @@ Building
|
|||||||
|
|
||||||
If a Makefile or Ninja generator is used to generate the build tree, it is not
|
If a Makefile or Ninja generator is used to generate the build tree, it is not
|
||||||
recommended to invoke ``make`` or ``ninja`` directly. Instead, it is
|
recommended to invoke ``make`` or ``ninja`` directly. Instead, it is
|
||||||
recommended that the IDE invoke :manual:`cmake(1)` with the ``--build``
|
recommended that the IDE invoke :manual:`cmake(1)` with the
|
||||||
argument, which will in turn invoke the appropriate build tool.
|
:option:`--build <cmake --build>` argument, which will in turn invoke the
|
||||||
|
appropriate build tool.
|
||||||
|
|
||||||
If an IDE project generator is used, such as :generator:`Xcode` or one of the
|
If an IDE project generator is used, such as :generator:`Xcode` or one of the
|
||||||
Visual Studio generators, and the IDE understands the project format used, the
|
Visual Studio generators, and the IDE understands the project format used, the
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ use :option:`-C <cpack -C>` to specify the configuration. For example:
|
|||||||
cpack -G ZIP -C Debug
|
cpack -G ZIP -C Debug
|
||||||
|
|
||||||
For a list of available generators, see :manual:`cpack-generators(7)` or call
|
For a list of available generators, see :manual:`cpack-generators(7)` or call
|
||||||
``cpack --help``. An :cpack_gen:`archive generator <CPack Archive Generator>`
|
:option:`cpack --help`. An :cpack_gen:`archive generator <CPack Archive Generator>`
|
||||||
like ZIP creates a compressed archive of all *installed* files.
|
like ZIP creates a compressed archive of all *installed* files.
|
||||||
|
|
||||||
To create an archive of the *full* source tree you would type:
|
To create an archive of the *full* source tree you would type:
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ The CMake tooling may report warnings which are intended
|
|||||||
for the provider of the software, not intended for the
|
for the provider of the software, not intended for the
|
||||||
consumer of the software. Such warnings end with "This
|
consumer of the software. Such warnings end with "This
|
||||||
warning is for project developers". Users may disable
|
warning is for project developers". Users may disable
|
||||||
such warnings by passing the ``-Wno-dev`` flag to
|
such warnings by passing the :option:`-Wno-dev <cmake -Wno-dev>`
|
||||||
:manual:`cmake(1)`.
|
flag to :manual:`cmake(1)`.
|
||||||
|
|
||||||
cmake-gui tool
|
cmake-gui tool
|
||||||
--------------
|
--------------
|
||||||
@@ -159,7 +159,7 @@ the :option:`-G <cmake -G>` option:
|
|||||||
|
|
||||||
$ cmake .. -G Ninja
|
$ cmake .. -G Ninja
|
||||||
|
|
||||||
The output of ``cmake --help`` includes a list of
|
The output of :option:`cmake --help` includes a list of
|
||||||
:manual:`generators <cmake-generators(7)>` available
|
:manual:`generators <cmake-generators(7)>` available
|
||||||
for the user to choose from. Note that generator
|
for the user to choose from. Note that generator
|
||||||
names are case sensitive.
|
names are case sensitive.
|
||||||
@@ -428,10 +428,10 @@ Using presets on the command-line
|
|||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
When using the :manual:`cmake(1)` command line tool, a
|
When using the :manual:`cmake(1)` command line tool, a
|
||||||
preset can be invoked by using the ``--preset`` option. If
|
preset can be invoked by using the :option:`--preset <cmake --preset>`
|
||||||
``--preset`` is specified, the generator and build
|
option. If :option:`--preset <cmake --preset>` is specified,
|
||||||
directory are not required, but can be specified to
|
the generator and build directory are not required, but can be
|
||||||
override them. For example, if you have the following
|
specified to override them. For example, if you have the following
|
||||||
``CMakePresets.json`` file:
|
``CMakePresets.json`` file:
|
||||||
|
|
||||||
.. code-block:: json
|
.. code-block:: json
|
||||||
@@ -503,23 +503,25 @@ command may be invoked in the build directory:
|
|||||||
|
|
||||||
$ cmake --build .
|
$ cmake --build .
|
||||||
|
|
||||||
The ``--build`` flag enables a particular mode of
|
The :option:`--build <cmake --build>` flag enables a
|
||||||
operation for the :manual:`cmake(1)` tool. It invokes
|
particular mode of operation for the :manual:`cmake(1)`
|
||||||
the :variable:`CMAKE_MAKE_PROGRAM` command associated
|
tool. It invokes the :variable:`CMAKE_MAKE_PROGRAM`
|
||||||
with the :manual:`generator <cmake-generators(7)>`, or
|
command associated with the
|
||||||
|
:manual:`generator <cmake-generators(7)>`, or
|
||||||
the build tool configured by the user.
|
the build tool configured by the user.
|
||||||
|
|
||||||
The ``--build`` mode also accepts the parameter
|
The :option:`--build <cmake --build>` mode also accepts
|
||||||
``--target`` to specify a particular target to build,
|
the parameter :option:`--target <cmake --target>` to
|
||||||
for example a particular library, executable or
|
specify a particular target to build, for example a
|
||||||
custom target, or a particular special target like
|
particular library, executable or custom target, or a
|
||||||
``install``:
|
particular special target like ``install``:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ cmake --build . --target myexe
|
$ cmake --build . --target myexe
|
||||||
|
|
||||||
The ``--build`` mode also accepts a ``--config`` parameter
|
The :option:`--build <cmake --build>` mode also accepts a
|
||||||
|
:option:`--config <cmake --config>` parameter
|
||||||
in the case of multi-config generators to specify which
|
in the case of multi-config generators to specify which
|
||||||
particular configuration to build:
|
particular configuration to build:
|
||||||
|
|
||||||
@@ -527,23 +529,23 @@ particular configuration to build:
|
|||||||
|
|
||||||
$ cmake --build . --target myexe --config Release
|
$ cmake --build . --target myexe --config Release
|
||||||
|
|
||||||
The ``--config`` option has no effect if the generator
|
The :option:`--config <cmake --config>` option has no
|
||||||
generates a buildsystem specific to a configuration which
|
effect if the generator generates a buildsystem specific
|
||||||
is chosen when invoking cmake with the
|
to a configuration which is chosen when invoking cmake
|
||||||
:variable:`CMAKE_BUILD_TYPE` variable.
|
with the :variable:`CMAKE_BUILD_TYPE` variable.
|
||||||
|
|
||||||
Some buildsystems omit details of command lines invoked
|
Some buildsystems omit details of command lines invoked
|
||||||
during the build. The ``--verbose`` flag can be used to
|
during the build. The :option:`-verbose <cmake --verbose>`
|
||||||
cause those command lines to be shown:
|
flag can be used to cause those command lines to be shown:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ cmake --build . --target myexe --verbose
|
$ cmake --build . --target myexe --verbose
|
||||||
|
|
||||||
The ``--build`` mode can also pass particular command
|
The :option:`--build <cmake --build>` mode can also pass
|
||||||
line options to the underlying build tool by listing
|
particular command line options to the underlying build
|
||||||
them after ``--``. This can be useful to specify
|
tool by listing them after ``--``. This can be useful
|
||||||
options to the build tool, such as to continue the
|
to specify options to the build tool, such as to continue the
|
||||||
build after a failed job, where CMake does not
|
build after a failed job, where CMake does not
|
||||||
provide a high-level user interface.
|
provide a high-level user interface.
|
||||||
|
|
||||||
@@ -639,9 +641,9 @@ building the ``foo.i`` target will preprocess both files.
|
|||||||
Specifying a Build Program
|
Specifying a Build Program
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
The program invoked by the ``--build`` mode is determined
|
The program invoked by the :option:`--build <cmake --build>`
|
||||||
by the :variable:`CMAKE_MAKE_PROGRAM` variable. For most
|
mode is determined by the :variable:`CMAKE_MAKE_PROGRAM` variable.
|
||||||
generators, the particular program does not need to be
|
For most generators, the particular program does not need to be
|
||||||
configured.
|
configured.
|
||||||
|
|
||||||
===================== =========================== ===========================
|
===================== =========================== ===========================
|
||||||
@@ -662,7 +664,8 @@ The ``jom`` tool is capable of reading makefiles of the
|
|||||||
``NMake`` flavor and building in parallel, while the
|
``NMake`` flavor and building in parallel, while the
|
||||||
``nmake`` tool always builds serially. After generating
|
``nmake`` tool always builds serially. After generating
|
||||||
with the :generator:`NMake Makefiles` generator a user
|
with the :generator:`NMake Makefiles` generator a user
|
||||||
can run ``jom`` instead of ``nmake``. The ``--build``
|
can run ``jom`` instead of ``nmake``. The
|
||||||
|
:option:`--build <cmake --build>`
|
||||||
mode would also use ``jom`` if the
|
mode would also use ``jom`` if the
|
||||||
:variable:`CMAKE_MAKE_PROGRAM` was set to ``jom`` while
|
:variable:`CMAKE_MAKE_PROGRAM` was set to ``jom`` while
|
||||||
using the :generator:`NMake Makefiles` generator, and
|
using the :generator:`NMake Makefiles` generator, and
|
||||||
@@ -746,8 +749,8 @@ run only tests without ``Qt`` in their name:
|
|||||||
|
|
||||||
$ ctest -E Qt
|
$ ctest -E Qt
|
||||||
|
|
||||||
Tests can be run in parallel by passing ``-j`` arguments
|
Tests can be run in parallel by passing :option:`-j <ctest -j>`
|
||||||
to :manual:`ctest(1)`:
|
arguments to :manual:`ctest(1)`:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@@ -755,14 +758,15 @@ to :manual:`ctest(1)`:
|
|||||||
|
|
||||||
The environment variable :envvar:`CTEST_PARALLEL_LEVEL`
|
The environment variable :envvar:`CTEST_PARALLEL_LEVEL`
|
||||||
can alternatively be set to avoid the need to pass
|
can alternatively be set to avoid the need to pass
|
||||||
``-j``.
|
:option:`-j <ctest -j>`.
|
||||||
|
|
||||||
By default :manual:`ctest(1)` does not print the output
|
By default :manual:`ctest(1)` does not print the output
|
||||||
from the tests. The command line argument ``-V`` (or
|
from the tests. The command line argument :option:`-V <ctest -V>`
|
||||||
``--verbose``) enables verbose mode to print the
|
(or ``--verbose``) enables verbose mode to print the
|
||||||
output from all tests.
|
output from all tests.
|
||||||
The ``--output-on-failure`` option prints the test
|
The :option:`--output-on-failure <ctest --output-on-failure>`
|
||||||
output for failing tests only. The environment variable
|
option prints the test output for failing tests only.
|
||||||
:envvar:`CTEST_OUTPUT_ON_FAILURE`
|
The environment variable :envvar:`CTEST_OUTPUT_ON_FAILURE`
|
||||||
can be set to ``1`` as an alternative to passing the
|
can be set to ``1`` as an alternative to passing the
|
||||||
``--output-on-failure`` option to :manual:`ctest(1)`.
|
:option:`--output-on-failure <ctest --output-on-failure>`
|
||||||
|
option to :manual:`ctest(1)`.
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ as a variant of some of the `Command-Line Build Tool Generators`_ to
|
|||||||
produce project files for an auxiliary IDE.
|
produce project files for an auxiliary IDE.
|
||||||
|
|
||||||
CMake Generators are platform-specific so each may be available only
|
CMake Generators are platform-specific so each may be available only
|
||||||
on certain platforms. The :manual:`cmake(1)` command-line tool ``--help``
|
on certain platforms. The :manual:`cmake(1)` command-line tool
|
||||||
output lists available generators on the current platform. Use its
|
:option:`--help <cmake --help>` output lists available generators on the
|
||||||
:option:`-G <cmake -G>` option to specify the generator for a new build tree.
|
current platform. Use its :option:`-G <cmake -G>` option to specify the
|
||||||
The :manual:`cmake-gui(1)` offers interactive selection of a generator
|
generator for a new build tree. The :manual:`cmake-gui(1)` offers
|
||||||
when creating a new build tree.
|
interactive selection of a generator when creating a new build tree.
|
||||||
|
|
||||||
CMake Generators
|
CMake Generators
|
||||||
================
|
================
|
||||||
@@ -108,9 +108,9 @@ Extra Generators
|
|||||||
================
|
================
|
||||||
|
|
||||||
Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
|
Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
|
||||||
command-line tool ``--help`` output may have variants that specify
|
command-line tool :option:`--help <cmake --help>` output may have
|
||||||
an extra generator for an auxiliary IDE tool. Such generator
|
variants that specify an extra generator for an auxiliary IDE tool.
|
||||||
names have the form ``<extra-generator> - <main-generator>``.
|
Such generator names have the form ``<extra-generator> - <main-generator>``.
|
||||||
The following extra generators are known to CMake.
|
The following extra generators are known to CMake.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ supports files included with the ``include`` field.
|
|||||||
|
|
||||||
``CMakePresets.json`` and ``CMakeUserPresets.json`` live in the project's root
|
``CMakePresets.json`` and ``CMakeUserPresets.json`` live in the project's root
|
||||||
directory. They both have exactly the same format, and both are optional
|
directory. They both have exactly the same format, and both are optional
|
||||||
(though at least one must be present if ``--preset`` is specified).
|
(though at least one must be present if :option:`--preset <cmake --preset>`
|
||||||
``CMakePresets.json`` is meant to specify project-wide build details, while
|
is specified). ``CMakePresets.json`` is meant to specify project-wide build
|
||||||
``CMakeUserPresets.json`` is meant for developers to specify their own local
|
details, while ``CMakeUserPresets.json`` is meant for developers to specify
|
||||||
build details.
|
their own local build details.
|
||||||
|
|
||||||
``CMakePresets.json`` may be checked into a version control system, and
|
``CMakePresets.json`` may be checked into a version control system, and
|
||||||
``CMakeUserPresets.json`` should NOT be checked in. For example, if a
|
``CMakeUserPresets.json`` should NOT be checked in. For example, if a
|
||||||
@@ -312,30 +312,35 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``dev``
|
``dev``
|
||||||
|
|
||||||
An optional boolean. Equivalent to passing ``-Wdev`` or ``-Wno-dev``
|
An optional boolean. Equivalent to passing :option:`-Wdev <cmake -Wdev>`
|
||||||
on the command line. This may not be set to ``false`` if ``errors.dev``
|
or :option:`-Wno-dev <cmake -Wno-dev>` on the command line. This may not
|
||||||
is set to ``true``.
|
be set to ``false`` if ``errors.dev`` is set to ``true``.
|
||||||
|
|
||||||
``deprecated``
|
``deprecated``
|
||||||
|
|
||||||
An optional boolean. Equivalent to passing ``-Wdeprecated`` or
|
An optional boolean. Equivalent to passing
|
||||||
``-Wno-deprecated`` on the command line. This may not be set to
|
:option:`-Wdeprecated <cmake -Wdeprecated>` or
|
||||||
``false`` if ``errors.deprecated`` is set to ``true``.
|
:option:`-Wno-deprecated <cmake -Wno-deprecated>` on the command line.
|
||||||
|
This may not be set to ``false`` if ``errors.deprecated`` is set to
|
||||||
|
``true``.
|
||||||
|
|
||||||
``uninitialized``
|
``uninitialized``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||||
``--warn-uninitialized`` on the command line.
|
:option:`--warn-uninitialized <cmake --warn-uninitialized>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``unusedCli``
|
``unusedCli``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``false`` is equivalent to passing
|
An optional boolean. Setting this to ``false`` is equivalent to passing
|
||||||
``--no-warn-unused-cli`` on the command line.
|
:option:`--no-warn-unused-cli <cmake --no-warn-unused-cli>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``systemVars``
|
``systemVars``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||||
``--check-system-vars`` on the command line.
|
:option:`--check-system-vars <cmake --check-system-vars>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``errors``
|
``errors``
|
||||||
|
|
||||||
@@ -362,17 +367,18 @@ that may contain the following fields:
|
|||||||
``output``
|
``output``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||||
``--debug-output`` on the command line.
|
:option:`--debug-output <cmake --debug-output>` on the command line.
|
||||||
|
|
||||||
``tryCompile``
|
``tryCompile``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||||
``--debug-trycompile`` on the command line.
|
:option:`--debug-trycompile <cmake --debug-trycompile>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``find``
|
``find``
|
||||||
|
|
||||||
An optional boolean. Setting this to ``true`` is equivalent to passing
|
An optional boolean. Setting this to ``true`` is equivalent to passing
|
||||||
``--debug-find`` on the command line.
|
:option:`--debug-find <cmake --debug-find>` on the command line.
|
||||||
|
|
||||||
Build Preset
|
Build Preset
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
@@ -392,7 +398,8 @@ that may contain the following fields:
|
|||||||
``hidden``
|
``hidden``
|
||||||
|
|
||||||
An optional boolean specifying whether or not a preset should be hidden.
|
An optional boolean specifying whether or not a preset should be hidden.
|
||||||
If a preset is hidden, it cannot be used in the ``--preset`` argument
|
If a preset is hidden, it cannot be used in the
|
||||||
|
:option:`--preset <cmake --preset>` argument
|
||||||
and does not have to have a valid ``configurePreset``, even from
|
and does not have to have a valid ``configurePreset``, even from
|
||||||
inheritance. ``hidden`` presets are intended to be used as a base for
|
inheritance. ``hidden`` presets are intended to be used as a base for
|
||||||
other presets to inherit via the ``inherits`` field.
|
other presets to inherit via the ``inherits`` field.
|
||||||
@@ -486,25 +493,25 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``jobs``
|
``jobs``
|
||||||
|
|
||||||
An optional integer. Equivalent to passing ``--parallel`` or ``-j`` on
|
An optional integer. Equivalent to passing
|
||||||
the command line.
|
:option:`--parallel <cmake --parallel>` or ``-j`` on the command line.
|
||||||
|
|
||||||
``targets``
|
``targets``
|
||||||
|
|
||||||
An optional string or array of strings. Equivalent to passing
|
An optional string or array of strings. Equivalent to passing
|
||||||
``--target`` or ``-t`` on the command line. Vendors may ignore the
|
:option:`--target <cmake --target>` or ``-t`` on the command line.
|
||||||
targets property or hide build presets that explicitly specify targets.
|
Vendors may ignore the targets property or hide build presets that
|
||||||
This field supports macro expansion.
|
explicitly specify targets. This field supports macro expansion.
|
||||||
|
|
||||||
``configuration``
|
``configuration``
|
||||||
|
|
||||||
An optional string. Equivalent to passing ``--config`` on the command
|
An optional string. Equivalent to passing :option:`--config <cmake --config>`
|
||||||
line.
|
on the command line.
|
||||||
|
|
||||||
``cleanFirst``
|
``cleanFirst``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--clean-first`` on
|
An optional bool. If true, equivalent to passing
|
||||||
the command line.
|
:option:`--clean-first <cmake --clean-first>` on the command line.
|
||||||
|
|
||||||
``resolvePackageReferences``
|
``resolvePackageReferences``
|
||||||
|
|
||||||
@@ -531,10 +538,12 @@ that may contain the following fields:
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The command line parameter ``--resolve-package-references`` will take
|
The command line parameter
|
||||||
priority over this setting. If the command line parameter is not provided
|
:option:`--resolve-package-references <cmake --resolve-package-references>`
|
||||||
and this setting is not specified, an environment-specific cache variable
|
will take priority over this setting. If the command line parameter is not
|
||||||
will be evaluated to decide, if package restoration should be performed.
|
provided and this setting is not specified, an environment-specific cache
|
||||||
|
variable will be evaluated to decide, if package restoration should be
|
||||||
|
performed.
|
||||||
|
|
||||||
When using the Visual Studio generator, package references are defined
|
When using the Visual Studio generator, package references are defined
|
||||||
using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references
|
using the :prop_tgt:`VS_PACKAGE_REFERENCES` property. Package references
|
||||||
@@ -544,8 +553,8 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``verbose``
|
``verbose``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--verbose`` on the
|
An optional bool. If true, equivalent to passing
|
||||||
command line.
|
:option:`--verbose <cmake --verbose>` on the command line.
|
||||||
|
|
||||||
``nativeToolOptions``
|
``nativeToolOptions``
|
||||||
|
|
||||||
@@ -569,7 +578,8 @@ that may contain the following fields:
|
|||||||
``hidden``
|
``hidden``
|
||||||
|
|
||||||
An optional boolean specifying whether or not a preset should be hidden.
|
An optional boolean specifying whether or not a preset should be hidden.
|
||||||
If a preset is hidden, it cannot be used in the ``--preset`` argument
|
If a preset is hidden, it cannot be used in the
|
||||||
|
:option:`--preset <ctest --preset>` argument
|
||||||
and does not have to have a valid ``configurePreset``, even from
|
and does not have to have a valid ``configurePreset``, even from
|
||||||
inheritance. ``hidden`` presets are intended to be used as a base for
|
inheritance. ``hidden`` presets are intended to be used as a base for
|
||||||
other presets to inherit via the ``inherits`` field.
|
other presets to inherit via the ``inherits`` field.
|
||||||
@@ -650,15 +660,15 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``configuration``
|
``configuration``
|
||||||
|
|
||||||
An optional string. Equivalent to passing ``--build-config`` on the
|
An optional string. Equivalent to passing
|
||||||
command line.
|
:option:`--build-config <ctest --build-config>` on the command line.
|
||||||
|
|
||||||
``overwriteConfigurationFile``
|
``overwriteConfigurationFile``
|
||||||
|
|
||||||
An optional array of configuration options to overwrite options
|
An optional array of configuration options to overwrite options
|
||||||
specified in the CTest configuration file. Equivalent to passing
|
specified in the CTest configuration file. Equivalent to passing
|
||||||
``--overwrite`` for each value in the array. The array values
|
:option:`--overwrite <ctest --overwrite>` for each value in the array.
|
||||||
support macro expansion.
|
The array values support macro expansion.
|
||||||
|
|
||||||
``output``
|
``output``
|
||||||
|
|
||||||
@@ -667,8 +677,8 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``shortProgress``
|
``shortProgress``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--progress`` on the
|
An optional bool. If true, equivalent to passing
|
||||||
command line.
|
:option:`--progress <ctest --progress>` on the command line.
|
||||||
|
|
||||||
``verbosity``
|
``verbosity``
|
||||||
|
|
||||||
@@ -681,65 +691,75 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``verbose``
|
``verbose``
|
||||||
|
|
||||||
Equivalent to passing ``--verbose`` on the command line.
|
Equivalent to passing :option:`--verbose <ctest --verbose>` on
|
||||||
|
the command line.
|
||||||
|
|
||||||
``extra``
|
``extra``
|
||||||
|
|
||||||
Equivalent to passing ``--extra-verbose`` on the command line.
|
Equivalent to passing :option:`--extra-verbose <ctest --extra-verbose>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``debug``
|
``debug``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--debug`` on the
|
An optional bool. If true, equivalent to passing
|
||||||
command line.
|
:option:`--debug <ctest --debug>` on the command line.
|
||||||
|
|
||||||
``outputOnFailure``
|
``outputOnFailure``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing
|
An optional bool. If true, equivalent to passing
|
||||||
``--output-on-failure`` on the command line.
|
:option:`--output-on-failure <ctest --output-on-failure>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``quiet``
|
``quiet``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--quiet`` on the
|
An optional bool. If true, equivalent to passing
|
||||||
command line.
|
:option:`--quiet <ctest --quiet>` on the command line.
|
||||||
|
|
||||||
``outputLogFile``
|
``outputLogFile``
|
||||||
|
|
||||||
An optional string specifying a path to a log file. Equivalent to
|
An optional string specifying a path to a log file. Equivalent to
|
||||||
passing ``--output-log`` on the command line. This field supports
|
passing :option:`--output-log <ctest --output-log>` on the command line.
|
||||||
macro expansion.
|
This field supports macro expansion.
|
||||||
|
|
||||||
``labelSummary``
|
``labelSummary``
|
||||||
|
|
||||||
An optional bool. If false, equivalent to passing
|
An optional bool. If false, equivalent to passing
|
||||||
``--no-label-summary`` on the command line.
|
:option:`--no-label-summary <ctest --no-label-summary>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``subprojectSummary``
|
``subprojectSummary``
|
||||||
|
|
||||||
An optional bool. If false, equivalent to passing
|
An optional bool. If false, equivalent to passing
|
||||||
``--no-subproject-summary`` on the command line.
|
:option:`--no-subproject-summary <ctest --no-subproject-summary>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``maxPassedTestOutputSize``
|
``maxPassedTestOutputSize``
|
||||||
|
|
||||||
An optional integer specifying the maximum output for passed tests in
|
An optional integer specifying the maximum output for passed tests in
|
||||||
bytes. Equivalent to passing ``--test-output-size-passed`` on the
|
bytes. Equivalent to passing
|
||||||
command line.
|
:option:`--test-output-size-passed <ctest --test-output-size-passed>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``maxFailedTestOutputSize``
|
``maxFailedTestOutputSize``
|
||||||
|
|
||||||
An optional integer specifying the maximum output for failed tests in
|
An optional integer specifying the maximum output for failed tests in
|
||||||
bytes. Equivalent to passing ``--test-output-size-failed`` on the
|
bytes. Equivalent to passing
|
||||||
command line.
|
:option:`--test-output-size-failed <ctest --test-output-size-failed>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``testOutputTruncation``
|
``testOutputTruncation``
|
||||||
|
|
||||||
An optional string specifying the test output truncation mode. Equivalent
|
An optional string specifying the test output truncation mode. Equivalent
|
||||||
to passing ``--test-output-truncation`` on the command line."
|
to passing
|
||||||
This is allowed in preset files specifying version ``5`` or above.
|
:option:`--test-output-truncation <ctest --test-output-truncation>` on
|
||||||
|
the command line. This is allowed in preset files specifying version
|
||||||
|
``5`` or above.
|
||||||
|
|
||||||
``maxTestNameWidth``
|
``maxTestNameWidth``
|
||||||
|
|
||||||
An optional integer specifying the maximum width of a test name to
|
An optional integer specifying the maximum width of a test name to
|
||||||
output. Equivalent to passing ``--max-width`` on the command line.
|
output. Equivalent to passing :option:`--max-width <ctest --max-width>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``filter``
|
``filter``
|
||||||
|
|
||||||
@@ -754,29 +774,29 @@ that may contain the following fields:
|
|||||||
``name``
|
``name``
|
||||||
|
|
||||||
An optional string specifying a regex for test names. Equivalent to
|
An optional string specifying a regex for test names. Equivalent to
|
||||||
passing ``--tests-regex`` on the command line. This field supports
|
passing :option:`--tests-regex <ctest --tests-regex>` on the command
|
||||||
macro expansion. CMake regex syntax is described under
|
line. This field supports macro expansion. CMake regex syntax is
|
||||||
:ref:`string(REGEX) <Regex Specification>`.
|
described under :ref:`string(REGEX) <Regex Specification>`.
|
||||||
|
|
||||||
|
|
||||||
``label``
|
``label``
|
||||||
|
|
||||||
An optional string specifying a regex for test labels. Equivalent to
|
An optional string specifying a regex for test labels. Equivalent to
|
||||||
passing ``--label-regex`` on the command line. This field supports
|
passing :option:`--label-regex <ctest --label-regex>` on the command
|
||||||
macro expansion.
|
line. This field supports macro expansion.
|
||||||
|
|
||||||
``useUnion``
|
``useUnion``
|
||||||
|
|
||||||
An optional bool. Equivalent to passing ``--union`` on the command
|
An optional bool. Equivalent to passing :option:`--union <ctest --union>`
|
||||||
line.
|
on the command line.
|
||||||
|
|
||||||
``index``
|
``index``
|
||||||
|
|
||||||
An optional object specifying tests to include by test index. The
|
An optional object specifying tests to include by test index. The
|
||||||
object may contain the following fields. Can also be an optional
|
object may contain the following fields. Can also be an optional
|
||||||
string specifying a file with the command line syntax for
|
string specifying a file with the command line syntax for
|
||||||
``--tests-information``. If specified as a string, this field
|
:option:`--tests-information <ctest --tests-information>`.
|
||||||
supports macro expansion.
|
If specified as a string, this field supports macro expansion.
|
||||||
|
|
||||||
``start``
|
``start``
|
||||||
|
|
||||||
@@ -803,14 +823,14 @@ that may contain the following fields:
|
|||||||
``name``
|
``name``
|
||||||
|
|
||||||
An optional string specifying a regex for test names. Equivalent to
|
An optional string specifying a regex for test names. Equivalent to
|
||||||
passing ``--exclude-regex`` on the command line. This field supports
|
passing :option:`--exclude-regex <ctest --exclude-regex>` on the
|
||||||
macro expansion.
|
command line. This field supports macro expansion.
|
||||||
|
|
||||||
``label``
|
``label``
|
||||||
|
|
||||||
An optional string specifying a regex for test labels. Equivalent to
|
An optional string specifying a regex for test labels. Equivalent to
|
||||||
passing ``--label-exclude`` on the command line. This field supports
|
passing :option:`--label-exclude <ctest --label-exclude>` on the
|
||||||
macro expansion.
|
command line. This field supports macro expansion.
|
||||||
|
|
||||||
``fixtures``
|
``fixtures``
|
||||||
|
|
||||||
@@ -820,21 +840,23 @@ that may contain the following fields:
|
|||||||
``any``
|
``any``
|
||||||
|
|
||||||
An optional string specifying a regex for text fixtures to exclude
|
An optional string specifying a regex for text fixtures to exclude
|
||||||
from adding any tests. Equivalent to ``--fixture-exclude-any`` on
|
from adding any tests. Equivalent to
|
||||||
|
:option:`--fixture-exclude-any <ctest --fixture-exclude-any>` on
|
||||||
the command line. This field supports macro expansion.
|
the command line. This field supports macro expansion.
|
||||||
|
|
||||||
``setup``
|
``setup``
|
||||||
|
|
||||||
An optional string specifying a regex for text fixtures to exclude
|
An optional string specifying a regex for text fixtures to exclude
|
||||||
from adding setup tests. Equivalent to ``--fixture-exclude-setup``
|
from adding setup tests. Equivalent to
|
||||||
|
:option:`--fixture-exclude-setup <ctest --fixture-exclude-setup>`
|
||||||
on the command line. This field supports macro expansion.
|
on the command line. This field supports macro expansion.
|
||||||
|
|
||||||
``cleanup``
|
``cleanup``
|
||||||
|
|
||||||
An optional string specifying a regex for text fixtures to exclude
|
An optional string specifying a regex for text fixtures to exclude
|
||||||
from adding cleanup tests. Equivalent to
|
from adding cleanup tests. Equivalent to
|
||||||
``--fixture-exclude-cleanup`` on the command line. This field
|
:option:`--fixture-exclude-cleanup <ctest --fixture-exclude-cleanup>`
|
||||||
supports macro expansion.
|
on the command line. This field supports macro expansion.
|
||||||
|
|
||||||
``execution``
|
``execution``
|
||||||
|
|
||||||
@@ -843,32 +865,35 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``stopOnFailure``
|
``stopOnFailure``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--stop-on-failure``
|
An optional bool. If true, equivalent to passing
|
||||||
on the command line.
|
:option:`--stop-on-failure <ctest --stop-on-failure>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``enableFailover``
|
``enableFailover``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``-F`` on the command
|
An optional bool. If true, equivalent to passing :option:`-F <ctest -F>`
|
||||||
line.
|
on the command line.
|
||||||
|
|
||||||
``jobs``
|
``jobs``
|
||||||
|
|
||||||
An optional integer. Equivalent to passing ``--parallel`` on the
|
An optional integer. Equivalent to passing
|
||||||
command line.
|
:option:`--parallel <ctest --parallel>` on the command line.
|
||||||
|
|
||||||
``resourceSpecFile``
|
``resourceSpecFile``
|
||||||
|
|
||||||
An optional string. Equivalent to passing ``--resource-spec-file`` on
|
An optional string. Equivalent to passing
|
||||||
|
:option:`--resource-spec-file <ctest --resource-spec-file>` on
|
||||||
the command line. This field supports macro expansion.
|
the command line. This field supports macro expansion.
|
||||||
|
|
||||||
``testLoad``
|
``testLoad``
|
||||||
|
|
||||||
An optional integer. Equivalent to passing ``--test-load`` on the
|
An optional integer. Equivalent to passing
|
||||||
command line.
|
:option:`--test-load <ctest --test-load>` on the command line.
|
||||||
|
|
||||||
``showOnly``
|
``showOnly``
|
||||||
|
|
||||||
An optional string. Equivalent to passing ``--show-only`` on the
|
An optional string. Equivalent to passing
|
||||||
|
:option:`--show-only <ctest --show-only>` on the
|
||||||
command line. The string must be one of the following values:
|
command line. The string must be one of the following values:
|
||||||
|
|
||||||
``human``
|
``human``
|
||||||
@@ -878,8 +903,8 @@ that may contain the following fields:
|
|||||||
``repeat``
|
``repeat``
|
||||||
|
|
||||||
An optional object specifying how to repeat tests. Equivalent to
|
An optional object specifying how to repeat tests. Equivalent to
|
||||||
passing ``--repeat`` on the command line. The object must have the
|
passing :option:`--repeat <ctest --repeat>` on the command line.
|
||||||
following fields.
|
The object must have the following fields.
|
||||||
|
|
||||||
``mode``
|
``mode``
|
||||||
|
|
||||||
@@ -898,19 +923,21 @@ that may contain the following fields:
|
|||||||
``interactiveDebugging``
|
``interactiveDebugging``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing
|
An optional bool. If true, equivalent to passing
|
||||||
``--interactive-debug-mode 1`` on the command line. If false,
|
:option:`--interactive-debug-mode 1 <ctest --interactive-debug-mode>`
|
||||||
equivalent to passing ``--interactive-debug-mode 0`` on the command
|
on the command line. If false, equivalent to passing
|
||||||
line.
|
:option:`--interactive-debug-mode 0 <ctest --interactive-debug-mode>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``scheduleRandom``
|
``scheduleRandom``
|
||||||
|
|
||||||
An optional bool. If true, equivalent to passing ``--schedule-random``
|
An optional bool. If true, equivalent to passing
|
||||||
on the command line.
|
:option:`--schedule-random <ctest --schedule-random>` on the command
|
||||||
|
line.
|
||||||
|
|
||||||
``timeout``
|
``timeout``
|
||||||
|
|
||||||
An optional integer. Equivalent to passing ``--timeout`` on the
|
An optional integer. Equivalent to passing
|
||||||
command line.
|
:option:`--timeout <ctest --timeout>` on the command line.
|
||||||
|
|
||||||
``noTestsAction``
|
``noTestsAction``
|
||||||
|
|
||||||
@@ -923,11 +950,13 @@ that may contain the following fields:
|
|||||||
|
|
||||||
``error``
|
``error``
|
||||||
|
|
||||||
Equivalent to passing ``--no-tests=error`` on the command line.
|
Equivalent to passing :option:`--no-tests=error <ctest --no-tests>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
``ignore``
|
``ignore``
|
||||||
|
|
||||||
Equivalent to passing ``--no-tests=ignore`` on the command line.
|
Equivalent to passing :option:`--no-tests=ignore <ctest --no-tests>`
|
||||||
|
on the command line.
|
||||||
|
|
||||||
Condition
|
Condition
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ Build Tree
|
|||||||
Generator
|
Generator
|
||||||
This chooses the kind of buildsystem to generate. See the
|
This chooses the kind of buildsystem to generate. See the
|
||||||
:manual:`cmake-generators(7)` manual for documentation of all generators.
|
:manual:`cmake-generators(7)` manual for documentation of all generators.
|
||||||
Run ``cmake --help`` to see a list of generators available locally.
|
Run :option:`cmake --help` to see a list of generators available locally.
|
||||||
Optionally use the :option:`-G <cmake -G>` option below to specify a
|
Optionally use the :option:`-G <cmake -G>` option below to specify a
|
||||||
generator, or simply accept the default CMake chooses for the current
|
generator, or simply accept the default CMake chooses for the current
|
||||||
platform.
|
platform.
|
||||||
@@ -558,7 +558,7 @@ following options:
|
|||||||
.. option:: --clean-first
|
.. option:: --clean-first
|
||||||
|
|
||||||
Build target ``clean`` first, then build.
|
Build target ``clean`` first, then build.
|
||||||
(To clean only, use ``--target clean``.)
|
(To clean only, use :option:`--target clean <cmake --target>`.)
|
||||||
|
|
||||||
.. option:: --resolve-package-references=<on|off|only>
|
.. option:: --resolve-package-references=<on|off|only>
|
||||||
|
|
||||||
@@ -601,7 +601,7 @@ following options:
|
|||||||
|
|
||||||
Pass remaining options to the native tool.
|
Pass remaining options to the native tool.
|
||||||
|
|
||||||
Run ``cmake --build`` with no options for quick help.
|
Run :option:`cmake --build` with no options for quick help.
|
||||||
|
|
||||||
Install a Project
|
Install a Project
|
||||||
=================
|
=================
|
||||||
@@ -647,7 +647,7 @@ The options are:
|
|||||||
|
|
||||||
This option can be omitted if :envvar:`VERBOSE` environment variable is set.
|
This option can be omitted if :envvar:`VERBOSE` environment variable is set.
|
||||||
|
|
||||||
Run ``cmake --install`` with no options for quick help.
|
Run :option:`cmake --install` with no options for quick help.
|
||||||
|
|
||||||
Open a Project
|
Open a Project
|
||||||
==============
|
==============
|
||||||
@@ -700,7 +700,10 @@ CMake provides builtin command-line tools through the signature
|
|||||||
|
|
||||||
cmake -E <command> [<options>]
|
cmake -E <command> [<options>]
|
||||||
|
|
||||||
Run ``cmake -E`` or ``cmake -E help`` for a summary of commands.
|
.. option:: -E [help]
|
||||||
|
|
||||||
|
Run ``cmake -E`` or ``cmake -E help`` for a summary of commands.
|
||||||
|
|
||||||
Available commands are:
|
Available commands are:
|
||||||
|
|
||||||
.. option:: capabilities
|
.. option:: capabilities
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ CMAKE_CPACK_COMMAND
|
|||||||
Full path to :manual:`cpack(1)` command installed with CMake.
|
Full path to :manual:`cpack(1)` command installed with CMake.
|
||||||
|
|
||||||
This is the full path to the CPack executable :manual:`cpack(1)` which is
|
This is the full path to the CPack executable :manual:`cpack(1)` which is
|
||||||
useful from custom commands that want to use the :manual:`cmake(1)` ``-E``
|
useful from custom commands that want to use the :option:`cmake -E <cmake_E -E>`
|
||||||
option for portable system commands.
|
option for portable system commands.
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ CMAKE_CTEST_COMMAND
|
|||||||
Full path to :manual:`ctest(1)` command installed with CMake.
|
Full path to :manual:`ctest(1)` command installed with CMake.
|
||||||
|
|
||||||
This is the full path to the CTest executable :manual:`ctest(1)` which is
|
This is the full path to the CTest executable :manual:`ctest(1)` which is
|
||||||
useful from custom commands that want to use the :manual:`cmake(1)` ``-E``
|
useful from custom commands that want to use the :option:`cmake -E <cmake_E -E>`
|
||||||
option for portable system commands.
|
option for portable system commands.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ error:
|
|||||||
* :command:`find_package`
|
* :command:`find_package`
|
||||||
|
|
||||||
Output is designed for human consumption and not for parsing.
|
Output is designed for human consumption and not for parsing.
|
||||||
Enabling this variable is equivalent to using :manual:`cmake <cmake(1)>` ``--debug-find``
|
Enabling this variable is equivalent to using :option:`cmake --debug-find`
|
||||||
with the added ability to enable debugging for a subset of find calls.
|
with the added ability to enable debugging for a subset of find calls.
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ The name of the generator that is being used to generate the build
|
|||||||
files. (e.g. ``Unix Makefiles``, ``Ninja``, etc.)
|
files. (e.g. ``Unix Makefiles``, ``Ninja``, etc.)
|
||||||
|
|
||||||
The value of this variable should never be modified by project code.
|
The value of this variable should never be modified by project code.
|
||||||
A generator may be selected via the :manual:`cmake(1)` ``-G`` option,
|
A generator may be selected via the :option:`cmake -G` option,
|
||||||
interactively in :manual:`cmake-gui(1)`, or via the :envvar:`CMAKE_GENERATOR`
|
interactively in :manual:`cmake-gui(1)`, or via the :envvar:`CMAKE_GENERATOR`
|
||||||
environment variable.
|
environment variable.
|
||||||
|
|||||||
@@ -27,8 +27,9 @@ first :command:`project` invocation.
|
|||||||
|
|
||||||
The ``CMAKE_INSTALL_PREFIX`` may be defined when configuring a build tree
|
The ``CMAKE_INSTALL_PREFIX`` may be defined when configuring a build tree
|
||||||
to set its installation prefix. Or, when using the :manual:`cmake(1)`
|
to set its installation prefix. Or, when using the :manual:`cmake(1)`
|
||||||
command-line tool's ``--install`` mode, one may specify a different prefix
|
command-line tool's :option:`--install <cmake --install>` mode, one may
|
||||||
using the ``--prefix`` option:
|
specify a different prefix using the :option:`--prefix <cmake --prefix>`
|
||||||
|
option:
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,6 @@ to configure the project:
|
|||||||
variable, changing the value has undefined behavior.
|
variable, changing the value has undefined behavior.
|
||||||
|
|
||||||
The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
|
The ``CMAKE_MAKE_PROGRAM`` variable is set for use by project code.
|
||||||
The value is also used by the :manual:`cmake(1)` ``--build`` and
|
The value is also used by the :option:`cmake --build` and
|
||||||
:manual:`ctest(1)` ``--build-and-test`` tools to launch the native
|
:option:`ctest --build-and-test` tools to launch the native
|
||||||
build process.
|
build process.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ CMAKE_MESSAGE_CONTEXT
|
|||||||
|
|
||||||
.. versionadded:: 3.17
|
.. versionadded:: 3.17
|
||||||
|
|
||||||
When enabled by the :manual:`cmake <cmake(1)>` ``--log-context`` command line
|
When enabled by the :option:`cmake --log-context` command line
|
||||||
option or the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW` variable, the
|
option or the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW` variable, the
|
||||||
:command:`message` command converts the ``CMAKE_MESSAGE_CONTEXT`` list into a
|
:command:`message` command converts the ``CMAKE_MESSAGE_CONTEXT`` list into a
|
||||||
dot-separated string surrounded by square brackets and prepends it to each line
|
dot-separated string surrounded by square brackets and prepends it to each line
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ CMAKE_MESSAGE_LOG_LEVEL
|
|||||||
|
|
||||||
When set, this variable specifies the logging level used by the
|
When set, this variable specifies the logging level used by the
|
||||||
:command:`message` command. Valid values are the same as those for the
|
:command:`message` command. Valid values are the same as those for the
|
||||||
``--log-level`` command line option of the :manual:`cmake(1)` program.
|
:option:`--log-level <cmake --log-level>` command line option of the
|
||||||
If this variable is set and the ``--log-level`` command line option is
|
:manual:`cmake(1)` program. If this variable is set and the
|
||||||
|
:option:`--log-level <cmake --log-level>` command line option is
|
||||||
given, the command line option takes precedence.
|
given, the command line option takes precedence.
|
||||||
|
|
||||||
The main advantage to using this variable is to make a log level persist
|
The main advantage to using this variable is to make a log level persist
|
||||||
|
|||||||
@@ -42,5 +42,8 @@ only for the policies that do not warn by default:
|
|||||||
This variable should not be set by a project in CMake code. Project
|
This variable should not be set by a project in CMake code. Project
|
||||||
developers running CMake may set this variable in their cache to
|
developers running CMake may set this variable in their cache to
|
||||||
enable the warning (e.g. ``-DCMAKE_POLICY_WARNING_CMP<NNNN>=ON``).
|
enable the warning (e.g. ``-DCMAKE_POLICY_WARNING_CMP<NNNN>=ON``).
|
||||||
Alternatively, running :manual:`cmake(1)` with the ``--debug-output``,
|
Alternatively, running :manual:`cmake(1)` with the
|
||||||
``--trace``, or ``--trace-expand`` option will also enable the warning.
|
:option:`--debug-output <cmake --debug-output>`,
|
||||||
|
:option:`--trace <cmake --trace>`, or
|
||||||
|
:option:`--trace-expand <cmake --trace-expand>` option will also
|
||||||
|
enable the warning.
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
CMAKE_SCRIPT_MODE_FILE
|
CMAKE_SCRIPT_MODE_FILE
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Full path to the :manual:`cmake(1)` ``-P`` script file currently being
|
Full path to the :option:`cmake -P <cmake_P -P>` script file currently being
|
||||||
processed.
|
processed.
|
||||||
|
|
||||||
When run in :manual:`cmake(1)` ``-P`` script mode, CMake sets this variable to
|
When run in :option:`cmake -P <cmake_P -P>` script mode, CMake sets this variable to
|
||||||
the full path of the script file. When run to configure a ``CMakeLists.txt``
|
the full path of the script file. When run to configure a ``CMakeLists.txt``
|
||||||
file, this variable is not set.
|
file, this variable is not set.
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ If not ``FALSE``, use of deprecated functionality will issue warnings.
|
|||||||
If this variable is not set, CMake behaves as if it were set to ``TRUE``.
|
If this variable is not set, CMake behaves as if it were set to ``TRUE``.
|
||||||
|
|
||||||
When running :manual:`cmake(1)`, this option can be enabled with the
|
When running :manual:`cmake(1)`, this option can be enabled with the
|
||||||
``-Wdeprecated`` option, or disabled with the ``-Wno-deprecated`` option.
|
:option:`-Wdeprecated <cmake -Wdeprecated>` option, or disabled with the
|
||||||
|
:option:`-Wno-deprecated <cmake -Wno-deprecated>` option.
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ CTEST_CONFIGURATION_TYPE
|
|||||||
Specify the CTest ``DefaultCTestConfigurationType`` setting
|
Specify the CTest ``DefaultCTestConfigurationType`` setting
|
||||||
in a :manual:`ctest(1)` dashboard client script.
|
in a :manual:`ctest(1)` dashboard client script.
|
||||||
|
|
||||||
If the configuration type is set via ``-C <cfg>`` from the command line
|
If the configuration type is set via :option:`-C \<cfg\> <ctest -C>` from the command line
|
||||||
then this variable is populated accordingly.
|
then this variable is populated accordingly.
|
||||||
|
|||||||
Reference in New Issue
Block a user