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

Method Compute

Source/cmExportSet.cxx:34–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool 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
64void cmExportSet::AddTargetExport(std::unique_ptr<cmTargetExport> te)
65{

Callers 4

GenerateTestFilesMethod · 0.45
GenerateMethod · 0.45

Calls 8

cmStrCatFunction · 0.70
findMethod · 0.45
endMethod · 0.45
IssueMessageMethod · 0.45
GetNameMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected