| 105 | } |
| 106 | |
| 107 | bool cmBlockFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, |
| 108 | cmExecutionStatus& inStatus) |
| 109 | { |
| 110 | auto& mf = inStatus.GetMakefile(); |
| 111 | |
| 112 | // Invoke all the functions that were collected in the block. |
| 113 | for (cmListFileFunction const& fn : functions) { |
| 114 | cmExecutionStatus status(mf); |
| 115 | mf.ExecuteCommand(fn, status); |
| 116 | if (status.GetReturnInvoked()) { |
| 117 | mf.RaiseScope(status.GetReturnVariables()); |
| 118 | inStatus.SetReturnInvoked(status.GetReturnVariables()); |
| 119 | return true; |
| 120 | } |
| 121 | if (status.GetBreakInvoked()) { |
| 122 | inStatus.SetBreakInvoked(); |
| 123 | return true; |
| 124 | } |
| 125 | if (status.GetContinueInvoked()) { |
| 126 | inStatus.SetContinueInvoked(); |
| 127 | return true; |
| 128 | } |
| 129 | if (status.HasExitCode()) { |
| 130 | inStatus.SetExitCode(status.GetExitCode()); |
| 131 | return true; |
| 132 | } |
| 133 | if (cmSystemTools::GetFatalErrorOccurred()) { |
| 134 | return true; |
| 135 | } |
| 136 | } |
| 137 | return true; |
| 138 | } |
| 139 | |
| 140 | } // anonymous namespace |
| 141 |
nothing calls this directly
no test coverage detected