summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-09 14:26:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-09 14:26:33 (GMT)
commit8bd5e5f181f2f458681dd1435f96b180c3b095dc (patch)
tree63be621729d4a411cd440a142383a029f6d8bd0f /Source
parent242435a9c891bda62880b77d6d612a8975f11059 (diff)
parent5558070d5265c9a8c15efb64787eaadbd3adb60f (diff)
downloadCMake-8bd5e5f181f2f458681dd1435f96b180c3b095dc.zip
CMake-8bd5e5f181f2f458681dd1435f96b180c3b095dc.tar.gz
CMake-8bd5e5f181f2f458681dd1435f96b180c3b095dc.tar.bz2
Merge topic 'execution-status'
5558070d52 cmExecutionStatus: Remove function Clear Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3654
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExecutionStatus.h9
-rw-r--r--Source/cmForEachCommand.cxx3
-rw-r--r--Source/cmIfCommand.cxx3
3 files changed, 2 insertions, 13 deletions
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index bcacc2f..654922c 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -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; }
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 1d961be..a565786 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -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();
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index c5cfd8c..7b49ae7 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -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();