summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-06 12:09:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-06 22:32:15 (GMT)
commitdd11f72ced8a5a42ae0a1d7ca8a51b94e670a66f (patch)
tree324878c75900ceb6c05c5061f8f109f48dfc2ba5 /Source/cmGlobalGenerator.cxx
parent22590805bffe74c3b4998152556561a2c2b6d177 (diff)
downloadCMake-dd11f72ced8a5a42ae0a1d7ca8a51b94e670a66f.zip
CMake-dd11f72ced8a5a42ae0a1d7ca8a51b94e670a66f.tar.gz
CMake-dd11f72ced8a5a42ae0a1d7ca8a51b94e670a66f.tar.bz2
cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3c818ff..bc3c255 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2054,10 +2054,10 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
}
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
- cmTarget const& target) const
+ cmGeneratorTarget* target) const
{
- if(target.GetType() == cmTarget::INTERFACE_LIBRARY
- || target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
+ if(target->GetType() == cmTarget::INTERFACE_LIBRARY
+ || target->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
{
// This target is excluded from its directory.
return true;
@@ -2066,7 +2066,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
{
// This target is included in its directory. Check whether the
// directory is excluded.
- return this->IsExcluded(root, target.GetMakefile()->GetLocalGenerator());
+ return this->IsExcluded(root, target->GetLocalGenerator());
}
}
@@ -2127,15 +2127,16 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
{
cmTarget const& target = t->second;
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
+
// Consider the directory containing the target and all its
// parents until something excludes the target.
- for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, target);
+ for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
clg = clg->GetParent())
{
// This local generator includes the target.
std::set<cmGeneratorTarget const*>& targetSet =
this->LocalGeneratorToTargetMap[clg];
- cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
targetSet.insert(gt);
// Add dependencies of the included target. An excluded