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

Method invoke

Source/cmForEachCommand.cxx:256–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256auto 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
291bool HandleInMode(std::vector<std::string> const& args,
292 std::vector<std::string>::const_iterator kwInIter,

Callers 2

ReplayItemsMethod · 0.95
ReplayZipListsMethod · 0.95

Calls 8

ExecuteCommandMethod · 0.80
GetReturnInvokedMethod · 0.80
SetReturnInvokedMethod · 0.80
GetBreakInvokedMethod · 0.80
GetContinueInvokedMethod · 0.80
HasExitCodeMethod · 0.80
SetExitCodeMethod · 0.80
GetExitCodeMethod · 0.80

Tested by

no test coverage detected