From 1df8bd3ab0f6621b90a8801c1d10cfc94c74ff96 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 19 Oct 2015 00:41:14 +0200 Subject: [PATCH] cmGlobalGenerator: Port IsRootOnlyTarget to cmGeneratorTarget. --- Source/cmGlobalGenerator.cxx | 6 +++--- Source/cmGlobalGenerator.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1142ddd2e..08ad2ef41 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2704,13 +2704,13 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) { cmTarget* target = &l->second; - if(this->IsRootOnlyTarget(target) && + cmGeneratorTarget* gt = this->GetGeneratorTarget(target); + if(this->IsRootOnlyTarget(gt) && target->GetMakefile() != root->GetMakefile()) { continue; } // put the target in the set of original targets - cmGeneratorTarget* gt = this->GetGeneratorTarget(target); originalTargets.insert(gt); // Get the set of targets that depend on target this->AddTargetDepends(gt, projectTargets); @@ -2719,7 +2719,7 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, } //---------------------------------------------------------------------------- -bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target) const +bool cmGlobalGenerator::IsRootOnlyTarget(cmGeneratorTarget* target) const { return (target->GetType() == cmState::GLOBAL_TARGET || target->GetName() == this->GetAllTargetName()); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 4e6b11dae..c59d42d5b 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -376,7 +376,7 @@ protected: void GetTargetSets(TargetDependSet& projectTargets, TargetDependSet& originalTargets, cmLocalGenerator* root, GeneratorVector const&); - bool IsRootOnlyTarget(cmTarget* target) const; + bool IsRootOnlyTarget(cmGeneratorTarget* target) const; void AddTargetDepends(const cmGeneratorTarget* target, TargetDependSet& projectTargets); void SetLanguageEnabledFlag(const std::string& l, cmMakefile* mf);