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

Method FindExportInfo

Source/cmExportBuildFileGenerator.cxx:176–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176cmExportFileGenerator::ExportInfo cmExportBuildFileGenerator::FindExportInfo(
177 cmGeneratorTarget const* target) const
178{
179 std::vector<std::string> exportFiles;
180 std::set<std::string> exportSets;
181 std::set<std::string> namespaces;
182
183 auto const& name = target->GetName();
184 auto& allExportSets =
185 target->GetLocalGenerator()->GetGlobalGenerator()->GetBuildExportSets();
186
187 for (auto const& exp : allExportSets) {
188 cmExportBuildFileGenerator const* const bfg = exp.second;
189 cmExportSet const* const exportSet = bfg->GetExportSet();
190 std::vector<TargetExport> targets;
191 bfg->GetTargets(targets);
192 if (std::any_of(
193 targets.begin(), targets.end(),
194 [&name](TargetExport const& te) { return te.Name == name; })) {
195 if (exportSet) {
196 exportSets.insert(exportSet->GetName());
197 } else {
198 exportSets.insert(exp.first);
199 }
200 exportFiles.push_back(exp.first);
201 namespaces.insert(bfg->GetNamespace());
202 }
203 }
204
205 return { exportFiles, exportSets, namespaces };
206}
207
208void cmExportBuildFileGenerator::ComplainAboutMissingTarget(
209 cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee,

Callers 3

HandleMissingTargetMethod · 0.95
NoteLinkedTargetMethod · 0.45
NoteLinkedTargetMethod · 0.45

Calls 10

GetTargetsMethod · 0.80
push_backMethod · 0.80
GetNameMethod · 0.45
GetGlobalGeneratorMethod · 0.45
GetLocalGeneratorMethod · 0.45
GetExportSetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
GetNamespaceMethod · 0.45

Tested by

no test coverage detected