| 578 | } |
| 579 | |
| 580 | bool cmComputeTargetDepends::CheckComponents( |
| 581 | cmComputeComponentGraph const& ccg) |
| 582 | { |
| 583 | // All non-trivial components should consist only of static |
| 584 | // libraries. |
| 585 | std::vector<NodeList> const& components = ccg.GetComponents(); |
| 586 | size_t nc = components.size(); |
| 587 | for (size_t c = 0; c < nc; ++c) { |
| 588 | // Get the current component. |
| 589 | NodeList const& nl = components[c]; |
| 590 | |
| 591 | // Skip trivial components. |
| 592 | if (nl.size() < 2) { |
| 593 | continue; |
| 594 | } |
| 595 | |
| 596 | // Immediately complain if no cycles are allowed at all. |
| 597 | if (this->NoCycles) { |
| 598 | this->ComplainAboutBadComponent(ccg, c); |
| 599 | return false; |
| 600 | } |
| 601 | |
| 602 | // Make sure the component is all STATIC_LIBRARY targets. |
| 603 | for (size_t ni : nl) { |
| 604 | if (this->Targets[ni]->GetType() != cmStateEnums::STATIC_LIBRARY) { |
| 605 | this->ComplainAboutBadComponent(ccg, c); |
| 606 | return false; |
| 607 | } |
| 608 | } |
| 609 | } |
| 610 | return true; |
| 611 | } |
| 612 | |
| 613 | void cmComputeTargetDepends::ComplainAboutBadComponent( |
| 614 | cmComputeComponentGraph const& ccg, size_t c, bool strong) |
no test coverage detected