| 781 | } |
| 782 | |
| 783 | bool cmGhsMultiTargetGenerator::VisitCustomCommand( |
| 784 | std::set<cmSourceFile const*>& temp, std::set<cmSourceFile const*>& perm, |
| 785 | std::vector<cmSourceFile const*>& order, cmSourceFile const* si) |
| 786 | { |
| 787 | /* check if permanent mark is set*/ |
| 788 | if (perm.find(si) == perm.end()) { |
| 789 | /* set temporary mark; check if revisit*/ |
| 790 | if (temp.insert(si).second) { |
| 791 | for (auto const& di : si->GetCustomCommand()->GetDepends()) { |
| 792 | cmSourceFile const* sf = |
| 793 | this->GeneratorTarget->GetLocalGenerator()->GetSourceFileWithOutput( |
| 794 | di); |
| 795 | /* if sf exists then visit */ |
| 796 | if (sf && this->VisitCustomCommand(temp, perm, order, sf)) { |
| 797 | return true; |
| 798 | } |
| 799 | } |
| 800 | /* mark as complete; insert into beginning of list*/ |
| 801 | perm.insert(si); |
| 802 | order.push_back(si); |
| 803 | return false; |
| 804 | } |
| 805 | /* revisiting item - not a DAG */ |
| 806 | return true; |
| 807 | } |
| 808 | /* already complete */ |
| 809 | return false; |
| 810 | } |
no test coverage detected