| 437 | } |
| 438 | |
| 439 | bool 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 | |
| 464 | bool cmGeneratorTarget::VerifyLinkItemIsTarget(LinkItemRole role, |
| 465 | cmLinkItem const& item) const |
no test coverage detected