diff options
author | Brad King <brad.king@kitware.com> | 2022-03-17 15:03:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-17 15:03:12 (GMT) |
commit | 7aa1e08bdaa1930ccc0b8782c1bd970b1169b825 (patch) | |
tree | ce7ca441cd7731f5cc75f550b499c474ff3d7ac0 /Help/manual/cmake.1.rst | |
parent | d556ede7c810f82ac137c42182bb56949f285c3a (diff) | |
parent | fea270d3edd77de3930c57b316ed9391792aab6d (diff) | |
download | CMake-7aa1e08bdaa1930ccc0b8782c1bd970b1169b825.zip CMake-7aa1e08bdaa1930ccc0b8782c1bd970b1169b825.tar.gz CMake-7aa1e08bdaa1930ccc0b8782c1bd970b1169b825.tar.bz2 |
Merge topic 'doc-src-bld-selection'
fea270d3ed Help: Document cmake source and binary dir selection rules
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7076
Diffstat (limited to 'Help/manual/cmake.1.rst')
-rw-r--r-- | Help/manual/cmake.1.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 3c4e76a..01f754c 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -151,6 +151,26 @@ source and build trees and generate a buildsystem: 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. +Paths specified with ``-S`` or ``-B`` are always classified as source or +build trees, respectively. Paths specified with plain arguments are +classified based on their content and the types of paths given earlier. +If only one type of path is given, the current working directory (cwd) +is used for the other. For example: + +============================== ============ =========== + Command Line Source Dir Build Dir +============================== ============ =========== + ``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`` +============================== ============ =========== + After generating a buildsystem one may use the corresponding native build tool to build the project. For example, after using the :generator:`Unix Makefiles` generator one may run ``make`` directly: |