| 615 | } |
| 616 | |
| 617 | bool 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 | |
| 647 | bool cmGlobalGhsMultiGenerator::AddCheckTarget() |
| 648 | { |
no test coverage detected