cmGlobalGenerator: Convert IsExcluded to loop.
This commit is contained in:
parent
5f05b56284
commit
9b44018d52
|
@ -2046,27 +2046,23 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||||
{
|
{
|
||||||
assert(gen);
|
assert(gen);
|
||||||
|
|
||||||
if(gen == root)
|
cmLocalGenerator* lg = gen;
|
||||||
|
while (lg)
|
||||||
{
|
{
|
||||||
// No directory excludes itself.
|
if(lg == root)
|
||||||
return false;
|
{
|
||||||
}
|
// No directory excludes itself.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(gen->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
||||||
{
|
{
|
||||||
// This directory is excluded from its parent.
|
// This directory is excluded from its parent.
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
lg = lg->GetParent();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
cmLocalGenerator* lg = gen->GetParent();
|
|
||||||
if (!lg)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This directory is included in its parent. Check whether the
|
|
||||||
// parent is excluded.
|
|
||||||
return this->IsExcluded(root, lg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||||
|
|
Loading…
Reference in New Issue