diff options
-rw-r--r-- | Help/generator/Ninja Multi-Config.rst | 3 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Help/generator/Ninja Multi-Config.rst b/Help/generator/Ninja Multi-Config.rst index e6c7a1c..112db74 100644 --- a/Help/generator/Ninja Multi-Config.rst +++ b/Help/generator/Ninja Multi-Config.rst @@ -21,8 +21,7 @@ are intended to be run with ``ninja -f build-<Config>.ninja``. A ``cmake --build . --config <Config>`` will always use ``build-<Config>.ninja`` to build. If no ``--config`` argument is specified, ``cmake --build .`` will -default to ``build-Debug.ninja``, unless a ``build.ninja`` is generated (see -below), in which case that will be used instead. +use ``build.ninja``. Each ``build-<Config>.ninja`` file contains ``<target>`` targets as well as ``<target>:<Config>`` targets, where ``<Config>`` is the same as the diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 6b9a0f3..985f430 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2532,14 +2532,14 @@ bool cmGlobalNinjaMultiGenerator::OpenBuildFileStreams() return false; } - if (!this->DefaultFileConfig.empty()) { - if (!this->OpenFileStream(this->DefaultFileStream, NINJA_BUILD_FILE)) { - return false; - } - *this->DefaultFileStream - << "# Build using rules for '" << this->DefaultFileConfig << "'.\n\n" - << "include " << GetNinjaImplFilename(this->DefaultFileConfig) << "\n\n"; + if (!this->OpenFileStream(this->DefaultFileStream, NINJA_BUILD_FILE)) { + return false; } + *this->DefaultFileStream << "# Build using rules for '" + << this->DefaultFileConfig << "'.\n\n" + << "include " + << GetNinjaImplFilename(this->DefaultFileConfig) + << "\n\n"; // Write a comment about this file. *this->CommonFileStream |