From f0e60ea867f8ac96fd855754b9f71329d36f7e52 Mon Sep 17 00:00:00 2001 From: scivision Date: Fri, 17 Feb 2023 09:53:05 -0500 Subject: Help: cmake (1): put modern configure signature first recommend compact, most robust signature first. So many people are still using the multi-step pre-3.13 way of initializing a build. Rather than simply cmake -Bbuild which is one step instead of 3 just to configure a new project. --- Help/manual/ccmake.1.rst | 1 + Help/manual/cmake-gui.1.rst | 2 +- Help/manual/cmake.1.rst | 36 ++++++++++++++++++------------------ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Help/manual/ccmake.1.rst b/Help/manual/ccmake.1.rst index a09857b..5b118d1 100644 --- a/Help/manual/ccmake.1.rst +++ b/Help/manual/ccmake.1.rst @@ -8,6 +8,7 @@ Synopsis .. parsed-literal:: + ccmake [] -B [-S ] ccmake [] Description diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst index 367b0a7..26083ca 100644 --- a/Help/manual/cmake-gui.1.rst +++ b/Help/manual/cmake-gui.1.rst @@ -9,8 +9,8 @@ Synopsis .. parsed-literal:: cmake-gui [] + cmake-gui [] -B [-S ] cmake-gui [] - cmake-gui [] -S -B cmake-gui [] --browse-manual [] Description diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index a107c66..1ea7626 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -9,8 +9,8 @@ Synopsis .. parsed-literal:: `Generate a Project Buildsystem`_ + cmake [] -B [-S ] cmake [] - cmake [] -S -B `Build a Project`_ cmake --build [] [-- ] @@ -116,6 +116,20 @@ Generate a Project Buildsystem Run CMake with one of the following command signatures to specify the source and build trees and generate a buildsystem: +``cmake [] -B [-S ]`` + + .. versionadded:: 3.13 + + Uses ```` as the build tree and ```` + as the source tree. The specified paths may be absolute or relative + to the current working directory. The source tree must contain a + ``CMakeLists.txt`` file. The build tree will be created automatically + if it does not already exist. For example: + + .. code-block:: console + + $ cmake -S src -B build + ``cmake [] `` Uses the current working directory as the build tree, and ```` as the source tree. The specified path may @@ -141,20 +155,6 @@ source and build trees and generate a buildsystem: $ cd build $ cmake . -``cmake [] -S -B `` - - .. versionadded:: 3.13 - - Uses ```` as the build tree and ```` - as the source tree. The specified paths may be absolute or relative - to the current working directory. The source tree must contain a - ``CMakeLists.txt`` file. The build tree will be created automatically - if it does not already exist. For example: - - .. code-block:: console - - $ cmake -S src -B build - In all cases the ```` may be zero or more of the `Options`_ below. The above styles for specifying the source and build trees may be mixed. @@ -167,14 +167,14 @@ the current working directory (cwd) is used for the other. For example: ============================== ============ =========== Command Line Source Dir Build Dir ============================== ============ =========== + ``cmake -B build`` `cwd` ``build`` + ``cmake -B build src`` ``src`` ``build`` + ``cmake -B build -S src`` ``src`` ``build`` ``cmake src`` ``src`` `cwd` ``cmake build`` (existing) `loaded` ``build`` ``cmake -S src`` ``src`` `cwd` ``cmake -S src build`` ``src`` ``build`` ``cmake -S src -B build`` ``src`` ``build`` - ``cmake -B build`` `cwd` ``build`` - ``cmake -B build src`` ``src`` ``build`` - ``cmake -B build -S src`` ``src`` ``build`` ============================== ============ =========== .. versionchanged:: 3.23 -- cgit v0.12