| 262 | } |
| 263 | |
| 264 | cmExportFileGenerator::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 | |
| 297 | void cmExportInstallFileGenerator::ComplainAboutMissingTarget( |
| 298 | cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee, |
no test coverage detected