diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-25 17:54:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-29 07:54:31 (GMT) |
commit | 241304190ffdf9cc7d4ede0601da370b111468cc (patch) | |
tree | e35dd7fe5c89da1eed3abe10f37abe3586e64df7 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 87fe031a0703f07b8636f8ea59b6746788e71869 (diff) | |
download | CMake-241304190ffdf9cc7d4ede0601da370b111468cc.zip CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.gz CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.bz2 |
CMake code rely on cmList class for CMake lists management (part. 2)
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 0c28776..84c85e0 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -32,6 +32,7 @@ #include "cmGeneratorTarget.h" #include "cmGlobalGenerator.h" #include "cmLinkLineComputer.h" +#include "cmList.h" #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmLocalNinjaGenerator.h" @@ -3031,19 +3032,17 @@ void cmGlobalNinjaMultiGenerator::GetQtAutoGenConfigs( bool cmGlobalNinjaMultiGenerator::InspectConfigTypeVariables() { - std::vector<std::string> configsVec; - cmExpandList( - this->Makefiles.front()->GetSafeDefinition("CMAKE_CONFIGURATION_TYPES"), - configsVec); - if (configsVec.empty()) { - configsVec.emplace_back(); + cmList configsList{ this->Makefiles.front()->GetDefinition( + "CMAKE_CONFIGURATION_TYPES") }; + if (configsList.empty()) { + configsList.emplace_back(); } - std::set<std::string> configs(configsVec.cbegin(), configsVec.cend()); + std::set<std::string> configs(configsList.cbegin(), configsList.cend()); this->DefaultFileConfig = this->Makefiles.front()->GetSafeDefinition("CMAKE_DEFAULT_BUILD_TYPE"); if (this->DefaultFileConfig.empty()) { - this->DefaultFileConfig = configsVec.front(); + this->DefaultFileConfig = configsList.front(); } if (!configs.count(this->DefaultFileConfig)) { std::ostringstream msg; @@ -3055,11 +3054,9 @@ bool cmGlobalNinjaMultiGenerator::InspectConfigTypeVariables() return false; } - std::vector<std::string> crossConfigsVec; - cmExpandList( - this->Makefiles.front()->GetSafeDefinition("CMAKE_CROSS_CONFIGS"), - crossConfigsVec); - auto crossConfigs = ListSubsetWithAll(configs, configs, crossConfigsVec); + cmList crossConfigsList{ this->Makefiles.front()->GetSafeDefinition( + "CMAKE_CROSS_CONFIGS") }; + auto crossConfigs = ListSubsetWithAll(configs, configs, crossConfigsList); if (!crossConfigs) { std::ostringstream msg; msg << "CMAKE_CROSS_CONFIGS is not a subset of " @@ -3086,12 +3083,11 @@ bool cmGlobalNinjaMultiGenerator::InspectConfigTypeVariables() return false; } - std::vector<std::string> defaultConfigsVec; - cmExpandList(defaultConfigsString, defaultConfigsVec); + cmList defaultConfigsList(defaultConfigsString); if (!this->DefaultFileConfig.empty()) { auto defaultConfigs = ListSubsetWithAll(this->GetCrossConfigs(this->DefaultFileConfig), - this->CrossConfigs, defaultConfigsVec); + this->CrossConfigs, defaultConfigsList); if (!defaultConfigs) { std::ostringstream msg; msg << "CMAKE_DEFAULT_CONFIGS is not a subset of CMAKE_CROSS_CONFIGS"; |