Ninja Multi-Config: Fix segfault when installing an export
Fixes: #21290
This commit is contained in:
parent
18372afcd4
commit
f4215ee57d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user