diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-12 18:03:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-12 18:03:18 (GMT) |
commit | 6437343c9174f756246ae45aedeccfb58ef2109f (patch) | |
tree | b272a7dd1455245cedc4e5ca692b6cb575a6f233 | |
parent | 3fb2112880ca3be6299721f5add1928483de0b1b (diff) | |
parent | f4215ee57d53decea1623f60da2a598d035bf74a (diff) | |
download | CMake-6437343c9174f756246ae45aedeccfb58ef2109f.zip CMake-6437343c9174f756246ae45aedeccfb58ef2109f.tar.gz CMake-6437343c9174f756246ae45aedeccfb58ef2109f.tar.bz2 |
Merge topic 'ninja-multi-segfault' into release-3.19
f4215ee57d Ninja Multi-Config: Fix segfault when installing an export
18372afcd4 Help: Fix documentation for Ninja Multi-Config's build.ninja
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5355
-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 |