Commit 8bd5e5f1 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'execution-status'

5558070d cmExecutionStatus: Remove function Clear
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3654
parents 242435a9 5558070d
Pipeline #143449 passed with stage
in 0 seconds
......@@ -22,15 +22,6 @@ public:
{
}
void Clear()
{
this->Error = "unknown error.";
this->ReturnInvoked = false;
this->BreakInvoked = false;
this->ContinueInvoked = false;
this->NestedError = false;
}
cmMakefile& GetMakefile() { return this->Makefile; }
void SetError(std::string const& e) { this->Error = e; }
......
......@@ -74,9 +74,8 @@ bool cmForEachFunctionBlocker::Replay(
// set the variable to the loop value
mf.AddDefinition(this->Args[0], arg);
// Invoke all the functions that were collected in the block.
cmExecutionStatus status(mf);
for (cmListFileFunction const& func : functions) {
status.Clear();
cmExecutionStatus status(mf);
mf.ExecuteCommand(func, status);
if (status.GetReturnInvoked()) {
inStatus.SetReturnInvoked();
......
......@@ -61,7 +61,6 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
{
cmMakefile& mf = inStatus.GetMakefile();
// execute the functions for the true parts of the if statement
cmExecutionStatus status(mf);
int scopeDepth = 0;
for (cmListFileFunction const& func : functions) {
// keep track of scope depth
......@@ -147,7 +146,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
// should we execute?
else if (!this->IsBlocking) {
status.Clear();
cmExecutionStatus status(mf);
mf.ExecuteCommand(func, status);
if (status.GetReturnInvoked()) {
inStatus.SetReturnInvoked();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment