diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:57:25 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-24 18:03:29 (GMT) |
commit | 45f52003962f2f5ae58be2dd779f441bb4ca01f7 (patch) | |
tree | 6cec935c190956ecc4bfd8d19d6478cbdfeb6aa7 /Source | |
parent | af9fc277536f37980ccdab699a934b3c42e9fba9 (diff) | |
download | CMake-45f52003962f2f5ae58be2dd779f441bb4ca01f7.zip CMake-45f52003962f2f5ae58be2dd779f441bb4ca01f7.tar.gz CMake-45f52003962f2f5ae58be2dd779f441bb4ca01f7.tar.bz2 |
cmGlobalGenerator: Implement IsExcluded in terms of cmState::Snapshot.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index b7b4fba..d7aca47 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2046,21 +2046,22 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, { assert(gen); - cmLocalGenerator* lg = gen; - while (lg) + cmState::Snapshot rootSnp = root->GetStateSnapshot(); + cmState::Snapshot snp = gen->GetStateSnapshot(); + while (snp.IsValid()) { - if(lg == root) + if(snp == rootSnp) { // No directory excludes itself. return false; } - if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + if(snp.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) { // This directory is excluded from its parent. return true; } - lg = lg->GetParent(); + snp = snp.GetBuildsystemDirectoryParent(); } return false; } |