| 2551 | } |
| 2552 | |
| 2553 | void CheckIMPORTED_GLOBAL(cmTarget const* target, cmMakefile* context) |
| 2554 | { |
| 2555 | auto const& targets = context->GetOwnedImportedTargets(); |
| 2556 | auto it = |
| 2557 | std::find_if(targets.begin(), targets.end(), |
| 2558 | [&](std::unique_ptr<cmTarget> const& importTarget) -> bool { |
| 2559 | return target == importTarget.get(); |
| 2560 | }); |
| 2561 | if (it == targets.end()) { |
| 2562 | std::ostringstream e; |
| 2563 | e << "Attempt to promote imported target \"" << target->GetName() |
| 2564 | << "\" to global scope (by setting IMPORTED_GLOBAL) " |
| 2565 | "which is not built in this directory."; |
| 2566 | context->IssueMessage(MessageType::FATAL_ERROR, e.str()); |
| 2567 | } |
| 2568 | } |
| 2569 | } |
| 2570 | |
| 2571 | void cmTarget::CheckProperty(std::string const& prop, |
no test coverage detected
searching dependent graphs…