diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:54:22 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-24 18:03:29 (GMT) |
commit | 9b44018d520cfabc347d6d79cafdf0a37c62b4e0 (patch) | |
tree | a005d511047c80ba5ddb849d96dd73be93683b8c /Source | |
parent | 5f05b56284f9a76aa90562186aebd383a3ca9349 (diff) | |
download | CMake-9b44018d520cfabc347d6d79cafdf0a37c62b4e0.zip CMake-9b44018d520cfabc347d6d79cafdf0a37c62b4e0.tar.gz CMake-9b44018d520cfabc347d6d79cafdf0a37c62b4e0.tar.bz2 |
cmGlobalGenerator: Convert IsExcluded to loop.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a610b3d..b7b4fba 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2046,27 +2046,23 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, { assert(gen); - if(gen == root) + cmLocalGenerator* lg = gen; + while (lg) { - // No directory excludes itself. - return false; - } - - if(gen->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) - { - // This directory is excluded from its parent. - return true; - } + if(lg == root) + { + // No directory excludes itself. + return false; + } - cmLocalGenerator* lg = gen->GetParent(); - if (!lg) - { - return false; + if(lg->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + // This directory is excluded from its parent. + return true; + } + lg = lg->GetParent(); } - - // This directory is included in its parent. Check whether the - // parent is excluded. - return this->IsExcluded(root, lg); + return false; } bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, |