summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-10 09:42:37 -0400
committerBrad King <brad.king@kitware.com>2016-05-10 09:45:45 -0400
commit3e503fe1acc7f341a160db30cd2d2db4ab0e8b8e (patch)
tree07fce1fdc37b2dee54df01d14f0b7383fea8300d /Help
parentd4faed2f7ffa1267b52e0cce9c0c32d8f88b6abc (diff)
downloadcmake-3e503fe1acc7f341a160db30cd2d2db4ab0e8b8e.tar.gz
Help: Document `cmake --build` as a separate command mode (#16093)
The `--build` mode was confusingly documented among other options, falsely implying that it can be used anywhere on the command line. Move the documentation to a dedicated section and clarify its usage as s separate command line mode.
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake.1.rst52
1 files changed, 34 insertions, 18 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 12b401244d..65153af416 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -10,7 +10,7 @@ Synopsis
cmake [<options>] (<path-to-source> | <path-to-existing-build>)
cmake [(-D <var>=<value>)...] -P <cmake-script-file>
- cmake --build <dir> [<options>] [-- <build-tool-options>...]
+ cmake --build <dir> [<options>...] [-- <build-tool-options>...]
cmake -E <command> [<options>...]
cmake --find-package <options>...
@@ -49,23 +49,7 @@ Options
display help for each variable.
``--build <dir>``
- Build a CMake-generated project binary tree.
-
- This abstracts a native build tool's command-line interface with the
- following options:
-
- ::
-
- <dir> = Project binary directory to be built.
- --target <tgt> = Build <tgt> instead of default targets.
- May only be specified once.
- --config <cfg> = For multi-configuration tools, choose <cfg>.
- --clean-first = Build target 'clean' first, then build.
- (To clean only, use --target 'clean'.)
- --use-stderr = Ignored. Behavior is default in CMake >= 3.0.
- -- = Pass remaining options to the native tool.
-
- Run ``cmake --build`` with no options for quick help.
+ See `Build Tool Mode`_.
``-N``
View mode only.
@@ -149,6 +133,38 @@ Options
.. include:: OPTIONS_HELP.txt
+Build Tool Mode
+===============
+
+CMake provides a command-line signature to build an already-generated
+project binary tree::
+
+ cmake --build <dir> [<options>...] [-- <build-tool-options>...]
+
+This abstracts a native build tool's command-line interface with the
+following options:
+
+``--build <dir>``
+ Project binary directory to be built. This is required and must be first.
+
+``--target <tgt>``
+ Build ``<tgt>`` instead of default targets. May only be specified once.
+
+``--config <cfg>``
+ For multi-configuration tools, choose configuration ``<cfg>``.
+
+``--clean-first``
+ Build target ``clean`` first, then build.
+ (To clean only, use ``--target clean``.)
+
+``--use-stderr``
+ Ignored. Behavior is default in CMake >= 3.0.
+
+``--``
+ Pass remaining options to the native tool.
+
+Run ``cmake --build`` with no options for quick help.
+
Command-Line Tool Mode
======================