diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-10-27 11:33:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-27 11:33:45 (GMT) |
commit | 698851cdb7e49c2705898a71b2eaf96ca70b9ad5 (patch) | |
tree | cdc361b069054bc6fea4a391e6f7dcf75dd15591 /Help | |
parent | 96ea613f169cedc4087b536d95ca6c128b8f4eb6 (diff) | |
parent | b7d7eca66db97f9dcb6068762733f06941c0c05a (diff) | |
download | CMake-698851cdb7e49c2705898a71b2eaf96ca70b9ad5.zip CMake-698851cdb7e49c2705898a71b2eaf96ca70b9ad5.tar.gz CMake-698851cdb7e49c2705898a71b2eaf96ca70b9ad5.tar.bz2 |
Merge topic 'cmake-presets-path-arg' into release-3.19
b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5416
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-gui.1.rst | 5 | ||||
-rw-r--r-- | Help/manual/cmake.1.rst | 32 |
2 files changed, 17 insertions, 20 deletions
diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst index d9c8ed7..97b5731 100644 --- a/Help/manual/cmake-gui.1.rst +++ b/Help/manual/cmake-gui.1.rst @@ -11,7 +11,6 @@ Synopsis cmake-gui [<options>] cmake-gui [<options>] {<path-to-source> | <path-to-existing-build>} cmake-gui [<options>] -S <path-to-source> -B <path-to-build> - cmake-gui [<options>] -S <path-to-source> --preset=<preset-name> Description =========== @@ -38,8 +37,8 @@ Options If the directory doesn't already exist CMake will make it. ``--preset=<preset-name>`` - Name of the preset to use from the project's ``CMakePresets.json`` file, if it - has one. + Name of the preset to use from the project's + :manual:`presets <cmake-presets(7)>` files, if it has them. .. include:: OPTIONS_HELP.txt diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 5452c79..921f5c4 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -12,7 +12,6 @@ Synopsis cmake [<options>] <path-to-source> cmake [<options>] <path-to-existing-build> cmake [<options>] -S <path-to-source> -B <path-to-build> - cmake [<options>] -S <path-to-source> --preset=<preset-name> `Build a Project`_ cmake --build <dir> [<options>] [-- <build-tool-options>] @@ -149,22 +148,6 @@ source and build trees and generate a buildsystem: $ cmake -S src -B build -``cmake [<options>] -S <path-to-source> --preset=<preset-name>`` - Uses ``<path-to-source>`` as the source tree and reads a - :manual:`preset <cmake-presets(7)>` from - ``<path-to-source>/CMakePresets.json`` and - ``<path-to-source>/CMakeUserPresets.json``. The preset specifies the - generator and the build directory, and optionally a list of variables and - other arguments to pass to CMake. The :manual:`CMake GUI <cmake-gui(1)>` can - also recognize ``CMakePresets.json`` and ``CMakeUserPresets.json`` files. For - full details on these files, see :manual:`cmake-presets(7)`. - - The presets are read before all other command line options. The options - specified by the preset (variables, generator, etc.) can all be overridden by - manually specifying them on the command line. For example, if the preset sets - a variable called ``MYVAR`` to ``1``, but the user sets it to ``2`` with a - ``-D`` argument, the value ``2`` is preferred. - In all cases the ``<options>`` may be zero or more of the `Options`_ below. After generating a buildsystem one may use the corresponding native @@ -394,6 +377,21 @@ Options about:tracing tab of Google Chrome or using a plugin for a tool like Trace Compass. +``--preset=<preset>`` + Reads a :manual:`preset <cmake-presets(7)>` from + ``<path-to-source>/CMakePresets.json`` and + ``<path-to-source>/CMakeUserPresets.json``. The preset specifies the + generator and the build directory, and optionally a list of variables and + other arguments to pass to CMake. The :manual:`CMake GUI <cmake-gui(1)>` can + also recognize ``CMakePresets.json`` and ``CMakeUserPresets.json`` files. For + full details on these files, see :manual:`cmake-presets(7)`. + + The presets are read before all other command line options. The options + specified by the preset (variables, generator, etc.) can all be overridden by + manually specifying them on the command line. For example, if the preset sets + a variable called ``MYVAR`` to ``1``, but the user sets it to ``2`` with a + ``-D`` argument, the value ``2`` is preferred. + .. _`Build Tool Mode`: Build a Project |