diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-09 17:51:01 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-09 17:51:01 (GMT) |
commit | f4215ee57d53decea1623f60da2a598d035bf74a (patch) | |
tree | b272a7dd1455245cedc4e5ca692b6cb575a6f233 /Source | |
parent | 18372afcd433cab570cbfa1223d05c604b1480b9 (diff) | |
download | CMake-f4215ee57d53decea1623f60da2a598d035bf74a.zip CMake-f4215ee57d53decea1623f60da2a598d035bf74a.tar.gz CMake-f4215ee57d53decea1623f60da2a598d035bf74a.tar.bz2 |
Ninja Multi-Config: Fix segfault when installing an export
Fixes: #21290
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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 |