| 19 | #include "cmake.h" |
| 20 | |
| 21 | cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( |
| 22 | cmGeneratorTarget const* target, std::string property, |
| 23 | GeneratorExpressionContent const* content, |
| 24 | cmGeneratorExpressionDAGChecker* parent, cm::GenEx::Context const& context, |
| 25 | cmListFileBacktrace backtrace, ComputingLinkLibraries computingLinkLibraries) |
| 26 | : Parent(parent) |
| 27 | , Top(parent ? parent->Top : this) |
| 28 | , Target(target) |
| 29 | , Property(std::move(property)) |
| 30 | , Content(content) |
| 31 | , Backtrace(std::move(backtrace)) |
| 32 | , ComputingLinkLibraries_(computingLinkLibraries) |
| 33 | { |
| 34 | if (parent) { |
| 35 | this->TopIsTransitiveProperty = parent->TopIsTransitiveProperty; |
| 36 | } else { |
| 37 | this->TopIsTransitiveProperty = |
| 38 | this->Target->IsTransitiveProperty(this->Property, context, this) |
| 39 | .has_value(); |
| 40 | } |
| 41 | |
| 42 | this->CheckResult = this->CheckGraph(); |
| 43 | |
| 44 | if (this->CheckResult == DAG && this->EvaluatingTransitiveProperty()) { |
| 45 | auto const* top = this->Top; |
| 46 | auto it = top->Seen.find(this->Target); |
| 47 | if (it != top->Seen.end()) { |
| 48 | std::set<std::string> const& propSet = it->second; |
| 49 | if (propSet.find(this->Property) != propSet.end()) { |
| 50 | this->CheckResult = ALREADY_SEEN; |
| 51 | return; |
| 52 | } |
| 53 | } |
| 54 | top->Seen[this->Target].insert(this->Property); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | cmGeneratorExpressionDAGChecker::Result |
| 59 | cmGeneratorExpressionDAGChecker::Check() const |
nothing calls this directly
no test coverage detected