summaryrefslogtreecommitdiff
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 25e7602377..4734c50975 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1953,6 +1953,11 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
{
cmTarget* target = &l->second;
+ if(this->IsRootOnlyTarget(target) &&
+ target->GetMakefile() != root->GetMakefile())
+ {
+ continue;
+ }
// put the target in the set of original targets
originalTargets.insert(target);
// Get the set of targets that depend on target
@@ -1962,6 +1967,13 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
}
//----------------------------------------------------------------------------
+bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target)
+{
+ return (target->GetType() == cmTarget::GLOBAL_TARGET ||
+ strcmp(target->GetName(), this->GetAllTargetName()) == 0);
+}
+
+//----------------------------------------------------------------------------
void cmGlobalGenerator::AddTargetDepends(cmTarget* target,
TargetDependSet& projectTargets)
{