cmGlobalGenerator: Implement IsExcluded in terms of cmState::Snapshot.
This commit is contained in:
parent
af9fc27753
commit
45f5200396
|
@ -2046,21 +2046,22 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
|
||||||
{
|
{
|
||||||
assert(gen);
|
assert(gen);
|
||||||
|
|
||||||
cmLocalGenerator* lg = gen;
|
cmState::Snapshot rootSnp = root->GetStateSnapshot();
|
||||||
while (lg)
|
cmState::Snapshot snp = gen->GetStateSnapshot();
|
||||||
|
while (snp.IsValid())
|
||||||
{
|
{
|
||||||
if(lg == root)
|
if(snp == rootSnp)
|
||||||
{
|
{
|
||||||
// No directory excludes itself.
|
// No directory excludes itself.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
if(snp.GetDirectory().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();
|
snp = snp.GetBuildsystemDirectoryParent();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue