From 10507c6dc0918777d43b3f961bd18162866f0bbb Mon Sep 17 00:00:00 2001 From: Daniel Eiband Date: Fri, 30 Aug 2019 11:47:37 +0200 Subject: cmMakefile: Add configurations getter with empty configuration default --- Source/cmGeneratorTarget.cxx | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'Source/cmGeneratorTarget.cxx') diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index cc37232039..6de7d83b14 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -786,11 +786,8 @@ void cmGeneratorTarget::ComputeObjectMapping() return; } - std::vector configs; - this->Makefile->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); - } + std::vector const& configs = + this->Makefile->GetGeneratorConfigs(); for (std::string const& c : configs) { std::vector sourceFiles; this->GetObjectSources(sourceFiles, c); @@ -2634,12 +2631,9 @@ cmTargetTraceDependencies::cmTargetTraceDependencies(cmGeneratorTarget* target) // Queue all the source files already specified for the target. if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { - std::vector configs; - this->Makefile->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); - } std::set emitted; + std::vector const& configs = + this->Makefile->GetGeneratorConfigs(); for (std::string const& c : configs) { std::vector sources; this->GeneratorTarget->GetSourceFiles(sources, c); @@ -2825,12 +2819,9 @@ void cmTargetTraceDependencies::CheckCustomCommand(cmCustomCommand const& cc) } // Queue the custom command dependencies. - std::vector configs; std::set emitted; - this->Makefile->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); - } + std::vector const& configs = + this->Makefile->GetGeneratorConfigs(); for (std::string const& conf : configs) { this->FollowCommandDepends(cc, conf, emitted); } @@ -6077,11 +6068,8 @@ const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation( bool cmGeneratorTarget::GetConfigCommonSourceFiles( std::vector& files) const { - std::vector configs; - this->Makefile->GetConfigurations(configs); - if (configs.empty()) { - configs.emplace_back(); - } + std::vector const& configs = + this->Makefile->GetGeneratorConfigs(); std::vector::const_iterator it = configs.begin(); const std::string& firstConfig = *it; -- cgit v1.2.1