diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 07:58:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-24 18:03:29 (GMT) |
commit | be56feb6184e80eab5ce93b5ab81308452a5559f (patch) | |
tree | 419d2be2c1d3e5d46cd96b96177452c26590b0df | |
parent | 45f52003962f2f5ae58be2dd779f441bb4ca01f7 (diff) | |
download | CMake-be56feb6184e80eab5ce93b5ab81308452a5559f.zip CMake-be56feb6184e80eab5ce93b5ab81308452a5559f.tar.gz CMake-be56feb6184e80eab5ce93b5ab81308452a5559f.tar.bz2 |
cmGlobalGenerator: Extract new IsExcluded overload.
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 20 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 2 |
2 files changed, 16 insertions, 6 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d7aca47..be7896d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2041,13 +2041,10 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen) } } -bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, - cmLocalGenerator* gen) const +bool cmGlobalGenerator::IsExcluded(cmState::Snapshot const& rootSnp, + cmState::Snapshot const& snp_) const { - assert(gen); - - cmState::Snapshot rootSnp = root->GetStateSnapshot(); - cmState::Snapshot snp = gen->GetStateSnapshot(); + cmState::Snapshot snp = snp_; while (snp.IsValid()) { if(snp == rootSnp) @@ -2067,6 +2064,17 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, } bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, + cmLocalGenerator* gen) const +{ + assert(gen); + + cmState::Snapshot rootSnp = root->GetStateSnapshot(); + cmState::Snapshot snp = gen->GetStateSnapshot(); + + return this->IsExcluded(rootSnp, snp); +} + +bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const { if(target->GetType() == cmTarget::INTERFACE_LIBRARY diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index fe710f1..23501bc 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -396,6 +396,8 @@ protected: // has been populated. void FillProjectMap(); void CheckLocalGenerators(); + bool IsExcluded(cmState::Snapshot const& root, + cmState::Snapshot const& snp) const; bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const; bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; virtual void InitializeProgressMarks() {} |