mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Help: Clarify 'cmake --build' signature alternatives
Documentation added by * commit4f4f2028b8(Help: Add documentation for buildPresets and testPresets, 2021-01-13, v3.20.0-rc1~51^2~7) * commit676ecf0d37(cmake-presets: Add build and test presets, 2020-12-14, v3.20.0-rc1~51^2~6) used square brackets in the `cmake --build` signature to indicate non-optional alternatives, which is not a typical convention. A common convention is to use parentheses instead, but in this case it is probably clearer to list the two signatures separately. Fixes: #22413
This commit is contained in:
@@ -408,7 +408,8 @@ project binary tree:
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
cmake --build [<dir> | --preset <preset>] [<options>] [-- <build-tool-options>]
|
cmake --build <dir> [<options>] [-- <build-tool-options>]
|
||||||
|
cmake --build --preset <preset> [<options>] [-- <build-tool-options>]
|
||||||
|
|
||||||
This abstracts a native build tool's command-line interface with the
|
This abstracts a native build tool's command-line interface with the
|
||||||
following options:
|
following options:
|
||||||
|
|||||||
@@ -600,7 +600,10 @@ int do_build(int ac, char const* const* av)
|
|||||||
if (dir.empty() && presetName.empty() && !listPresets) {
|
if (dir.empty() && presetName.empty() && !listPresets) {
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
std::cerr <<
|
std::cerr <<
|
||||||
"Usage: cmake --build [<dir> | --preset <preset>] [options] [-- [native-options]]\n"
|
"Usage: cmake --build <dir> "
|
||||||
|
" [options] [-- [native-options]]\n"
|
||||||
|
" cmake --build --preset <preset>"
|
||||||
|
" [options] [-- [native-options]]\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" <dir> = Project binary directory to be built.\n"
|
" <dir> = Project binary directory to be built.\n"
|
||||||
" --preset <preset>, --preset=<preset>\n"
|
" --preset <preset>, --preset=<preset>\n"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^'--parallel' invalid number '12ab' given\.
|
^'--parallel' invalid number '12ab' given\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^The <jobs> value is too large\.
|
^The <jobs> value is too large\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^'--parallel' invalid number '12ab' given\.
|
^'--parallel' invalid number '12ab' given\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^The <jobs> value requires a positive integer argument\.
|
^The <jobs> value requires a positive integer argument\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^'-j' invalid number '12ab' given\.
|
^'-j' invalid number '12ab' given\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^The <jobs> value is too large\.
|
^The <jobs> value is too large\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^'-j' invalid number '12ab' given\.
|
^'-j' invalid number '12ab' given\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
^The <jobs> value requires a positive integer argument\.
|
^The <jobs> value requires a positive integer argument\.
|
||||||
+
|
+
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
^Error: Building 'clean' and other targets together is not supported\.
|
^Error: Building 'clean' and other targets together is not supported\.
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
^Error: Building 'clean' and other targets together is not supported\.
|
^Error: Building 'clean' and other targets together is not supported\.
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
^Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
^Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
^Unknown argument --invalid-command
|
^Unknown argument --invalid-command
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
^Unknown argument --targetinvalid
|
^Unknown argument --targetinvalid
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
^Unknown argument -invalid-command
|
^Unknown argument -invalid-command
|
||||||
Usage: cmake --build \[<dir> \| --preset <preset>\] \[options\] \[-- \[native-options\]\]
|
Usage: cmake --build <dir> +\[options\] \[-- \[native-options\]\]
|
||||||
|
|||||||
Reference in New Issue
Block a user