diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-05-23 18:59:11 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-06-05 16:44:18 (GMT) |
commit | a08292059eba4fdded6643b225640ebf559b2dac (patch) | |
tree | 59ca961e323ccf3256667181311b86b75c1b3968 /Source/cmGeneratorExpressionDAGChecker.cxx | |
parent | efc205695de570c740285b38fbac701f77179ecb (diff) | |
download | CMake-a08292059eba4fdded6643b225640ebf559b2dac.zip CMake-a08292059eba4fdded6643b225640ebf559b2dac.tar.gz CMake-a08292059eba4fdded6643b225640ebf559b2dac.tar.bz2 |
genex: remove the need for backtraces
Rather than making dummy backtraces and passing them around, just make
backtraces optional.
Diffstat (limited to 'Source/cmGeneratorExpressionDAGChecker.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionDAGChecker.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index 7f8e694..531a471 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -24,6 +24,25 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( : Parent(parent), Target(target), Property(property), Content(content), Backtrace(backtrace), TransitivePropertiesOnly(false) { + Initialize(); +} + +//---------------------------------------------------------------------------- +cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( + const std::string &target, + const std::string &property, + const GeneratorExpressionContent *content, + cmGeneratorExpressionDAGChecker *parent) + : Parent(parent), Target(target), Property(property), + Content(content), TransitivePropertiesOnly(false) +{ + Initialize(); +} + +//---------------------------------------------------------------------------- +void +cmGeneratorExpressionDAGChecker::Initialize() +{ const cmGeneratorExpressionDAGChecker *top = this; const cmGeneratorExpressionDAGChecker *p = this->Parent; while (p) @@ -43,11 +62,12 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( #undef TEST_TRANSITIVE_PROPERTY_METHOD { std::map<std::string, std::set<std::string> >::const_iterator it - = top->Seen.find(target); + = top->Seen.find(this->Target); if (it != top->Seen.end()) { const std::set<std::string> &propSet = it->second; - const std::set<std::string>::const_iterator i = propSet.find(property); + const std::set<std::string>::const_iterator i + = propSet.find(this->Property); if (i != propSet.end()) { this->CheckResult = ALREADY_SEEN; @@ -55,7 +75,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( } } const_cast<cmGeneratorExpressionDAGChecker *>(top) - ->Seen[target].insert(property); + ->Seen[this->Target].insert(this->Property); } } |