| 174 | } |
| 175 | |
| 176 | cmExportFileGenerator::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 | |
| 208 | void cmExportBuildFileGenerator::ComplainAboutMissingTarget( |
| 209 | cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee, |
no test coverage detected