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

Function cmBreakCommand

Source/cmBreakCommand.cxx:10–31  ·  view source on GitHub ↗

cmBreakCommand

Source from the content-addressed store, hash-verified

8
9// cmBreakCommand
10bool cmBreakCommand(std::vector<std::string> const& args,
11 cmExecutionStatus& status)
12{
13 if (!status.GetMakefile().IsLoopBlock()) {
14 status.GetMakefile().IssueMessage(
15 MessageType::FATAL_ERROR,
16 "A BREAK command was found outside of a proper "
17 "FOREACH or WHILE loop scope.");
18 return false;
19 }
20
21 status.SetBreakInvoked();
22
23 if (!args.empty()) {
24 status.GetMakefile().IssueMessage(
25 MessageType::FATAL_ERROR,
26 "The BREAK command does not accept any arguments.");
27 return false;
28 }
29
30 return true;
31}

Callers

nothing calls this directly

Calls 5

IsLoopBlockMethod · 0.80
SetBreakInvokedMethod · 0.80
GetMakefileMethod · 0.45
IssueMessageMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…