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

Method VisitTarget

Source/cmGlobalGhsMultiGenerator.cxx:617–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615}
616
617bool cmGlobalGhsMultiGenerator::VisitTarget(
618 std::set<cmGeneratorTarget const*>& temp,
619 std::set<cmGeneratorTarget const*>& perm,
620 std::vector<cmGeneratorTarget const*>& order, cmGeneratorTarget const* ti)
621{
622 /* check if permanent mark is set*/
623 if (perm.find(ti) == perm.end()) {
624 /* set temporary mark; check if revisit*/
625 if (temp.insert(ti).second) {
626 /* sort targets lexicographically to ensure that nodes are always visited
627 * in the same order */
628 OrderedTargetDependSet sortedTargets(this->GetTargetDirectDepends(ti),
629 "");
630 for (auto const& di : sortedTargets) {
631 if (this->VisitTarget(temp, perm, order, di)) {
632 return true;
633 }
634 }
635 /* mark as complete; insert into beginning of list*/
636 perm.insert(ti);
637 order.push_back(ti);
638 return false;
639 }
640 /* revisiting item - not a DAG */
641 return true;
642 }
643 /* already complete */
644 return false;
645}
646
647bool cmGlobalGhsMultiGenerator::AddCheckTarget()
648{

Callers 1

Calls 5

push_backMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected