| 254 | } |
| 255 | |
| 256 | auto cmForEachFunctionBlocker::invoke( |
| 257 | std::vector<cmListFileFunction> const& functions, |
| 258 | cmExecutionStatus& inStatus, cmMakefile& mf) -> InvokeResult |
| 259 | { |
| 260 | InvokeResult result = { true, false }; |
| 261 | // Invoke all the functions that were collected in the block. |
| 262 | for (cmListFileFunction const& func : functions) { |
| 263 | cmExecutionStatus status(mf); |
| 264 | mf.ExecuteCommand(func, status); |
| 265 | if (status.GetReturnInvoked()) { |
| 266 | inStatus.SetReturnInvoked(status.GetReturnVariables()); |
| 267 | result.Break = true; |
| 268 | break; |
| 269 | } |
| 270 | if (status.GetBreakInvoked()) { |
| 271 | result.Break = true; |
| 272 | break; |
| 273 | } |
| 274 | if (status.GetContinueInvoked()) { |
| 275 | break; |
| 276 | } |
| 277 | if (status.HasExitCode()) { |
| 278 | inStatus.SetExitCode(status.GetExitCode()); |
| 279 | result.Break = true; |
| 280 | break; |
| 281 | } |
| 282 | if (cmSystemTools::GetFatalErrorOccurred()) { |
| 283 | result.Restore = false; |
| 284 | result.Break = true; |
| 285 | break; |
| 286 | } |
| 287 | } |
| 288 | return result; |
| 289 | } |
| 290 | |
| 291 | bool HandleInMode(std::vector<std::string> const& args, |
| 292 | std::vector<std::string>::const_iterator kwInIter, |
no test coverage detected