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

Class TargetPropertyEntryFileSet

Source/cmGeneratorTarget_TargetPropertyEntry.cxx:87–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85};
86
87class TargetPropertyEntryFileSet
88 : public cmGeneratorTarget::TargetPropertyEntry
89{
90public:
91 TargetPropertyEntryFileSet(
92 std::vector<std::string> dirs, bool contextSensitiveDirs,
93 std::unique_ptr<cmCompiledGeneratorExpression> entryCge,
94 cmFileSet const* fileSet, cmLinkItem const& item = NoLinkItem)
95 : cmGeneratorTarget::TargetPropertyEntry(item)
96 , BaseDirs(std::move(dirs))
97 , ContextSensitiveDirs(contextSensitiveDirs)
98 , EntryCge(std::move(entryCge))
99 , FileSet(fileSet)
100 {
101 }
102
103 std::string const& Evaluate(
104 cm::GenEx::Context const& context, cmGeneratorTarget const* headTarget,
105 cmGeneratorExpressionDAGChecker* dagChecker) const override
106 {
107 std::map<std::string, std::vector<std::string>> filesPerDir;
108 this->FileSet->EvaluateFileEntry(this->BaseDirs, filesPerDir,
109 this->EntryCge, context, headTarget,
110 dagChecker);
111
112 std::vector<std::string> files;
113 for (auto const& it : filesPerDir) {
114 files.insert(files.end(), it.second.begin(), it.second.end());
115 }
116
117 static std::string filesStr;
118 filesStr = cmList::to_string(files);
119 return filesStr;
120 }
121
122 cmListFileBacktrace GetBacktrace() const override
123 {
124 return this->EntryCge->GetBacktrace();
125 }
126
127 std::string const& GetInput() const override
128 {
129 return this->EntryCge->GetInput();
130 }
131
132 bool GetHadContextSensitiveCondition() const override
133 {
134 return this->ContextSensitiveDirs ||
135 this->EntryCge->GetHadContextSensitiveCondition();
136 }
137
138private:
139 std::vector<std::string> const BaseDirs;
140 bool const ContextSensitiveDirs;
141 std::unique_ptr<cmCompiledGeneratorExpression> const EntryCge;
142 cmFileSet const* FileSet;
143};
144

Callers

nothing calls this directly

Calls 5

to_stringFunction · 0.85
EvaluateFileEntryMethod · 0.80
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…