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

Method FindExportInfo

Source/cmExportInstallFileGenerator.cxx:264–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264cmExportFileGenerator::ExportInfo cmExportInstallFileGenerator::FindExportInfo(
265 cmGeneratorTarget const* target) const
266{
267 std::vector<std::string> exportFiles;
268 std::set<std::string> exportSets;
269 std::set<std::string> namespaces;
270
271 auto const& name = target->GetName();
272 auto& allExportSets =
273 target->GetLocalGenerator()->GetGlobalGenerator()->GetExportSets();
274
275 for (auto const& exp : allExportSets) {
276 auto const& exportSet = exp.second;
277 auto const& targets = exportSet.GetTargetExports();
278
279 if (std::any_of(targets.begin(), targets.end(),
280 [&name](std::unique_ptr<cmTargetExport> const& te) {
281 return te->TargetName == name;
282 })) {
283 std::vector<cmInstallExportGenerator const*> const* installs =
284 exportSet.GetInstallations();
285 if (!installs->empty()) {
286 exportSets.insert(exp.first);
287 for (cmInstallExportGenerator const* install : *installs) {
288 exportFiles.push_back(install->GetDestinationFile());
289 namespaces.insert(install->GetNamespace());
290 }
291 }
292 }
293 }
294 return { exportFiles, exportSets, namespaces };
295}
296
297void cmExportInstallFileGenerator::ComplainAboutMissingTarget(
298 cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee,

Callers 1

HandleMissingTargetMethod · 0.95

Calls 11

GetInstallationsMethod · 0.80
push_backMethod · 0.80
GetDestinationFileMethod · 0.80
GetNameMethod · 0.45
GetGlobalGeneratorMethod · 0.45
GetLocalGeneratorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45
GetNamespaceMethod · 0.45

Tested by

no test coverage detected