summaryrefslogtreecommitdiffstats
path: root/Help/generator
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-02-26 22:19:47 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-02-27 15:39:35 (GMT)
commitc794b70f194bcff6f06971767f18473da13950e3 (patch)
tree10882364d6d53229428bf2448ef25daf1325c75d /Help/generator
parent9590c3a400cc16882fee860818cfdcca82e17a37 (diff)
downloadCMake-c794b70f194bcff6f06971767f18473da13950e3.zip
CMake-c794b70f194bcff6f06971767f18473da13950e3.tar.gz
CMake-c794b70f194bcff6f06971767f18473da13950e3.tar.bz2
Ninja Multi-Config: Always generate build.ninja
If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item from CMAKE_CONFIGURATION_TYPES instead.
Diffstat (limited to 'Help/generator')
-rw-r--r--Help/generator/Ninja Multi-Config.rst15
1 files changed, 8 insertions, 7 deletions
diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst
index c2331f0..1f68535 100644
--- a/Help/generator/Ninja Multi-Config.rst
+++ b/Help/generator/Ninja Multi-Config.rst
@@ -12,9 +12,10 @@ multiple configurations at once with :variable:`CMAKE_CONFIGURATION_TYPES`
instead of only one configuration with :variable:`CMAKE_BUILD_TYPE`. One
``build-<Config>.ninja`` file will be generated for each of these
configurations (with ``<Config>`` being the configuration name.) These files
-are intended to be run with ``ninja -f build-<Config>.ninja``. No
-``build.ninja`` file is generated by default (see below for how to generate
-it.)
+are intended to be run with ``ninja -f build-<Config>.ninja``. A
+``build.ninja`` file is also generated, using the configuration from either
+:variable:`CMAKE_DEFAULT_BUILD_TYPE` or the first item from
+:variable:`CMAKE_CONFIGURATION_TYPES`.
``cmake --build . --config <Config>`` will always use ``build-<Config>.ninja``
to build. If no ``--config`` argument is specified, ``cmake --build .`` will
@@ -51,10 +52,10 @@ The ``Ninja Multi-Config`` generator recognizes the following variables:
:variable:`CMAKE_DEFAULT_BUILD_TYPE`
Specifies the configuration to use by default in a ``build.ninja`` file. If
- this variable is specified, a ``build.ninja`` file is generated which uses
- build rules from ``build-<Config>.ninja`` by default. All custom commands are
- executed with this configuration. If the variable is not specified, no
- ``build.ninja`` file is generated.
+ this variable is specified, ``build.ninja`` uses build rules from
+ ``build-<Config>.ninja`` by default. All custom commands are executed with
+ this configuration. If the variable is not specified, the first item from
+ :variable:`CMAKE_CONFIGURATION_TYPES` is used instead.
The value of this variable must be one of the items from
:variable:`CMAKE_CONFIGURATION_TYPES`.