| 32 | } |
| 33 | |
| 34 | bool cmExportSet::Compute(cmLocalGenerator* lg) |
| 35 | { |
| 36 | for (std::unique_ptr<cmTargetExport>& tgtExport : this->TargetExports) { |
| 37 | tgtExport->Target = lg->FindGeneratorTargetToUse(tgtExport->TargetName); |
| 38 | |
| 39 | auto const interfaceFileSets = |
| 40 | tgtExport->Target->Target->GetAllInterfaceFileSets(); |
| 41 | auto const fileSetInTargetExport = |
| 42 | [&tgtExport, lg](std::string const& fileSetName) -> bool { |
| 43 | if (tgtExport->FileSetGenerators.find(fileSetName) == |
| 44 | tgtExport->FileSetGenerators.end()) { |
| 45 | lg->IssueMessage(MessageType::FATAL_ERROR, |
| 46 | cmStrCat("File set \"", fileSetName, |
| 47 | "\" is listed in interface file sets of ", |
| 48 | tgtExport->Target->GetName(), |
| 49 | " but has not been exported")); |
| 50 | return false; |
| 51 | } |
| 52 | return true; |
| 53 | }; |
| 54 | |
| 55 | if (!std::all_of(interfaceFileSets.begin(), interfaceFileSets.end(), |
| 56 | fileSetInTargetExport)) { |
| 57 | return false; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | return true; |
| 62 | } |
| 63 | |
| 64 | void cmExportSet::AddTargetExport(std::unique_ptr<cmTargetExport> te) |
| 65 | { |
no test coverage detected