diff options
author | scivision <scivision@users.noreply.github.com> | 2023-02-17 14:53:05 (GMT) |
---|---|---|
committer | scivision <scivision@users.noreply.github.com> | 2023-02-19 01:13:40 (GMT) |
commit | f0e60ea867f8ac96fd855754b9f71329d36f7e52 (patch) | |
tree | 69e6595632f1b9d0313d8d19bb5f1d5e40fefe78 /Help | |
parent | 8b1160b509962f9ef6be43ef495a23f359c910ce (diff) | |
download | CMake-f0e60ea867f8ac96fd855754b9f71329d36f7e52.zip CMake-f0e60ea867f8ac96fd855754b9f71329d36f7e52.tar.gz CMake-f0e60ea867f8ac96fd855754b9f71329d36f7e52.tar.bz2 |
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.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/ccmake.1.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake-gui.1.rst | 2 | ||||
-rw-r--r-- | 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 [<options>] -B <path-to-build> [-S <path-to-source>] ccmake [<options>] <path-to-source | path-to-existing-build> 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 [<options>] + cmake-gui [<options>] -B <path-to-build> [-S <path-to-source>] cmake-gui [<options>] <path-to-source | path-to-existing-build> - cmake-gui [<options>] -S <path-to-source> -B <path-to-build> cmake-gui [<options>] --browse-manual [<filename>] 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 [<options>] -B <path-to-build> [-S <path-to-source>] cmake [<options>] <path-to-source | path-to-existing-build> - cmake [<options>] -S <path-to-source> -B <path-to-build> `Build a Project`_ cmake --build <dir> [<options>] [-- <build-tool-options>] @@ -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 [<options>] -B <path-to-build> [-S <path-to-source>]`` + + .. versionadded:: 3.13 + + Uses ``<path-to-build>`` as the build tree and ``<path-to-source>`` + 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 [<options>] <path-to-source>`` Uses the current working directory as the build tree, and ``<path-to-source>`` as the source tree. The specified path may @@ -141,20 +155,6 @@ source and build trees and generate a buildsystem: $ cd build $ cmake . -``cmake [<options>] -S <path-to-source> -B <path-to-build>`` - - .. versionadded:: 3.13 - - Uses ``<path-to-build>`` as the build tree and ``<path-to-source>`` - 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 ``<options>`` 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 |