summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-03 13:37:00 +0000
committerKitware Robot <kwrobot@kitware.com>2019-09-03 09:42:15 -0400
commit1f7bd0032253296413770567a90a0a88b6cccb34 (patch)
tree4ad8653e9614c721ed3ce37a09b30be2d2e05159 /Source/cmGeneratorTarget.cxx
parentc4f2f011084a5e64e6f3745071ea56a286758682 (diff)
parent10507c6dc0918777d43b3f961bd18162866f0bbb (diff)
downloadcmake-1f7bd0032253296413770567a90a0a88b6cccb34.tar.gz
Merge topic 'add-non-empty-configurations-getter'
10507c6dc0 cmMakefile: Add configurations getter with empty configuration default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3759
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx28
1 files changed, 8 insertions, 20 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 5fbff2b2a7..b9a9204496 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -786,11 +786,8 @@ void cmGeneratorTarget::ComputeObjectMapping()
return;
}
- std::vector<std::string> configs;
- this->Makefile->GetConfigurations(configs);
- if (configs.empty()) {
- configs.emplace_back();
- }
+ std::vector<std::string> const& configs =
+ this->Makefile->GetGeneratorConfigs();
for (std::string const& c : configs) {
std::vector<cmSourceFile const*> 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<std::string> configs;
- this->Makefile->GetConfigurations(configs);
- if (configs.empty()) {
- configs.emplace_back();
- }
std::set<cmSourceFile*> emitted;
+ std::vector<std::string> const& configs =
+ this->Makefile->GetGeneratorConfigs();
for (std::string const& c : configs) {
std::vector<cmSourceFile*> sources;
this->GeneratorTarget->GetSourceFiles(sources, c);
@@ -2825,12 +2819,9 @@ void cmTargetTraceDependencies::CheckCustomCommand(cmCustomCommand const& cc)
}
// Queue the custom command dependencies.
- std::vector<std::string> configs;
std::set<std::string> emitted;
- this->Makefile->GetConfigurations(configs);
- if (configs.empty()) {
- configs.emplace_back();
- }
+ std::vector<std::string> 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<cmSourceFile*>& files) const
{
- std::vector<std::string> configs;
- this->Makefile->GetConfigurations(configs);
- if (configs.empty()) {
- configs.emplace_back();
- }
+ std::vector<std::string> const& configs =
+ this->Makefile->GetGeneratorConfigs();
std::vector<std::string>::const_iterator it = configs.begin();
const std::string& firstConfig = *it;