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

Method VerifyLinkItemColons

Source/cmGeneratorTarget_Link.cxx:439–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439bool cmGeneratorTarget::VerifyLinkItemColons(LinkItemRole role,
440 cmLinkItem const& item) const
441{
442 if (item.Target || cmHasPrefix(item.AsStr(), "<LINK_GROUP:"_s) ||
443 item.AsStr().find("::") == std::string::npos) {
444 return true;
445 }
446 std::string e;
447 if (role == LinkItemRole::Implementation) {
448 e = cmStrCat(e, "Target \"", this->GetName(), "\" links to");
449 } else {
450 e = cmStrCat(e, "The link interface of target \"", this->GetName(),
451 "\" contains");
452 }
453 e = cmStrCat(e, ":\n ", item.AsStr(), "\nbut the target was not found. ",
454 missingTargetPossibleReasons);
455 cmListFileBacktrace backtrace = item.Backtrace;
456 if (backtrace.Empty()) {
457 backtrace = this->GetBacktrace();
458 }
459 this->GetLocalGenerator()->GetCMakeInstance()->IssueMessage(
460 MessageType::FATAL_ERROR, e, backtrace);
461 return false;
462}
463
464bool cmGeneratorTarget::VerifyLinkItemIsTarget(LinkItemRole role,
465 cmLinkItem const& item) const

Callers 1

CheckLinkLibrariesMethod · 0.95

Calls 9

GetBacktraceMethod · 0.95
GetLocalGeneratorMethod · 0.95
cmHasPrefixFunction · 0.85
EmptyMethod · 0.80
cmStrCatFunction · 0.70
findMethod · 0.45
GetNameMethod · 0.45
IssueMessageMethod · 0.45
GetCMakeInstanceMethod · 0.45

Tested by

no test coverage detected