diff options
author | Brad King <brad.king@kitware.com> | 2020-02-12 14:15:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-12 14:15:54 (GMT) |
commit | 566a9c84674f07128823acff811bd3a2f1fe71d3 (patch) | |
tree | 960bcdf3f9fde4b4329a4d67f3850760b3ad2c85 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 1c19cd19a4127a6c271c59eef7dc5fdc260a1e51 (diff) | |
parent | 46c836644d2566e2a568318e5676eaa08f65501e (diff) | |
download | CMake-566a9c84674f07128823acff811bd3a2f1fe71d3.zip CMake-566a9c84674f07128823acff811bd3a2f1fe71d3.tar.gz CMake-566a9c84674f07128823acff811bd3a2f1fe71d3.tar.bz2 |
Merge topic 'ninja-multi-default-configs-fix'
46c836644d Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4349
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 ff9c433..072c6e1 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -891,7 +891,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; @@ -902,7 +903,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; @@ -2641,7 +2642,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 " @@ -2672,8 +2673,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 " |