diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 27c28fe..5243c36 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -2488,8 +2488,7 @@ bool cmGlobalNinjaMultiGenerator::OpenBuildFileStreams() return false; } *this->DefaultFileStream - << "# This file is a convenience file generated by\n" - << "# CMAKE_DEFAULT_BUILD_TYPE.\n\n" + << "# Build using rules for '" << this->DefaultFileConfig << "'.\n\n" << "include " << GetNinjaImplFilename(this->DefaultFileConfig) << "\n\n"; } @@ -2606,9 +2605,6 @@ bool cmGlobalNinjaMultiGenerator::InspectConfigTypeVariables() std::string cmGlobalNinjaMultiGenerator::GetDefaultBuildConfig() const { - if (this->DefaultFileConfig.empty()) { - return "Debug"; - } return ""; } @@ -2625,8 +2621,10 @@ bool cmGlobalNinjaMultiGenerator::ReadCacheEntriesForBuild( this->DefaultFileConfig = state.GetSafeCacheEntryValue("CMAKE_DEFAULT_BUILD_TYPE"); - if (!this->DefaultFileConfig.empty() && - !configs.count(this->DefaultFileConfig)) { + if (this->DefaultFileConfig.empty()) { + this->DefaultFileConfig = configsVec.front(); + } + if (!configs.count(this->DefaultFileConfig)) { std::ostringstream msg; msg << "The configuration specified by " << "CMAKE_DEFAULT_BUILD_TYPE (" << this->DefaultFileConfig |