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

Method ComplainAboutMissingTarget

Source/cmExportInstallFileGenerator.cxx:297–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297void cmExportInstallFileGenerator::ComplainAboutMissingTarget(
298 cmGeneratorTarget const* depender, cmGeneratorTarget const* dependee,
299 ExportInfo const& exportInfo) const
300{
301 std::ostringstream e;
302 e << "install(" << this->IEGen->InstallSubcommand() << " \""
303 << this->GetExportName() << "\" ...) "
304 << "includes target \"" << depender->GetName()
305 << "\" which requires target \"" << dependee->GetName() << "\" ";
306 if (exportInfo.Sets.empty()) {
307 e << "that is not in any export set.";
308 } else {
309 if (exportInfo.Sets.size() == 1) {
310 e << "that is not in this export set, but in another export set which "
311 "is "
312 "exported multiple times with different namespaces: ";
313 } else {
314 e << "that is not in this export set, but in multiple other export "
315 "sets: ";
316 }
317 e << cmJoin(exportInfo.Files, ", ") << ".\n"
318 << "An exported target cannot depend upon another target which is "
319 "exported in more than one export set or with more than one "
320 "namespace. "
321 "Consider consolidating the exports of the \""
322 << dependee->GetName() << "\" target to a single export.";
323 }
324 this->ReportError(e.str());
325}
326
327void cmExportInstallFileGenerator::ComplainAboutDuplicateTarget(
328 std::string const& targetName) const

Callers 1

HandleMissingTargetMethod · 0.95

Calls 8

GetExportNameMethod · 0.80
strMethod · 0.80
cmJoinFunction · 0.70
InstallSubcommandMethod · 0.45
GetNameMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
ReportErrorMethod · 0.45

Tested by

no test coverage detected