diff options
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 55efff2..35421b6 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -890,7 +890,8 @@ bool cmGlobalNinjaGenerator::OpenFileStream( } cm::optional<std::set<std::string>> cmGlobalNinjaGenerator::ListSubsetWithAll( - const std::set<std::string>& defaults, const std::vector<std::string>& items) + const std::set<std::string>& all, const std::set<std::string>& defaults, + const std::vector<std::string>& items) { std::set<std::string> result; @@ -901,7 +902,7 @@ cm::optional<std::set<std::string>> cmGlobalNinjaGenerator::ListSubsetWithAll( } else { return cm::nullopt; } - } else if (defaults.count(item)) { + } else if (all.count(item)) { result.insert(item); } else { return cm::nullopt; @@ -2640,7 +2641,7 @@ bool cmGlobalNinjaMultiGenerator::ReadCacheEntriesForBuild( std::vector<std::string> crossConfigsVec; cmExpandList(state.GetSafeCacheEntryValue("CMAKE_NMC_CROSS_CONFIGS"), crossConfigsVec); - auto crossConfigs = ListSubsetWithAll(configs, crossConfigsVec); + auto crossConfigs = ListSubsetWithAll(configs, configs, crossConfigsVec); if (!crossConfigs) { std::ostringstream msg; msg << "CMAKE_NMC_CROSS_CONFIGS is not a subset of " @@ -2671,8 +2672,9 @@ bool cmGlobalNinjaMultiGenerator::ReadCacheEntriesForBuild( std::vector<std::string> defaultConfigsVec; cmExpandList(defaultConfigsString, defaultConfigsVec); if (!this->DefaultFileConfig.empty()) { - auto defaultConfigs = ListSubsetWithAll( - this->GetCrossConfigs(this->DefaultFileConfig), defaultConfigsVec); + auto defaultConfigs = + ListSubsetWithAll(this->GetCrossConfigs(this->DefaultFileConfig), + this->CrossConfigs, defaultConfigsVec); if (!defaultConfigs) { std::ostringstream msg; msg << "CMAKE_NMC_DEFAULT_CONFIGS is not a subset of " |