MCPcopy Create free account
hub / github.com/Kitware/CMake / cmGeneratorExpressionDAGChecker

Method cmGeneratorExpressionDAGChecker

Source/cmGeneratorExpressionDAGChecker.cxx:21–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "cmake.h"
20
21cmGeneratorExpressionDAGChecker::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
58cmGeneratorExpressionDAGChecker::Result
59cmGeneratorExpressionDAGChecker::Check() const

Callers

nothing calls this directly

Calls 8

CheckGraphMethod · 0.95
moveFunction · 0.85
has_valueMethod · 0.80
IsTransitivePropertyMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected