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

Method IntraComponent

Source/cmComputeTargetDepends.cxx:658–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658bool cmComputeTargetDepends::IntraComponent(std::vector<size_t> const& cmap,
659 size_t c, size_t i, size_t* head,
660 std::set<size_t>& emitted,
661 std::set<size_t>& visited)
662{
663 if (!visited.insert(i).second) {
664 // Cycle in utility depends!
665 return false;
666 }
667 if (emitted.insert(i).second) {
668 // Honor strong intra-component edges in the final order.
669 EdgeList const& el = this->InitialGraph[i];
670 for (cmGraphEdge const& edge : el) {
671 size_t j = edge;
672 if (cmap[j] == c && edge.IsStrong()) {
673 this->FinalGraph[i].emplace_back(j, true, edge.IsCross(),
674 edge.GetBacktrace());
675 if (!this->IntraComponent(cmap, c, j, head, emitted, visited)) {
676 return false;
677 }
678 }
679 }
680
681 // Prepend to a linear linked-list of intra-component edges.
682 if (*head != cmComputeComponentGraph::INVALID_COMPONENT) {
683 this->FinalGraph[i].emplace_back(*head, false, false,
684 cmListFileBacktrace());
685 } else {
686 this->ComponentTail[c] = i;
687 }
688 *head = i;
689 }
690 return true;
691}
692
693bool cmComputeTargetDepends::ComputeFinalDepends(
694 cmComputeComponentGraph const& ccg)

Callers 1

ComputeFinalDependsMethod · 0.95

Calls 6

IsStrongMethod · 0.80
emplace_backMethod · 0.80
cmListFileBacktraceClass · 0.70
insertMethod · 0.45
IsCrossMethod · 0.45
GetBacktraceMethod · 0.45

Tested by

no test coverage detected