[Cmake-commits] CMake branch, next, updated. v3.6.1-1823-g87a9ffc
Brad King
brad.king at kitware.com
Tue Sep 6 16:06:18 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 87a9ffca5fca9f6098e6098060b762a20a630a0c (commit)
via 65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06 (commit)
from 017e5a49c0b5014fe1652f9f509a96acd0557f18 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87a9ffca5fca9f6098e6098060b762a20a630a0c
commit 87a9ffca5fca9f6098e6098060b762a20a630a0c
Merge: 017e5a4 65f031a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 16:06:17 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 6 16:06:17 2016 -0400
Merge topic 'fix-continue-after-error' into next
65f031a4 Revert topic 'fix-continue-after-error'
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06
commit 65f031a4cd25ec5d1ef3dcba9b6bb3d60fc5ae06
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 6 16:05:57 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 6 16:05:57 2016 -0400
Revert topic 'fix-continue-after-error'
It generates assertion failures. Further invstigation needed.
diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h
index 7302837..14e1454 100644
--- a/Source/cmExecutionStatus.h
+++ b/Source/cmExecutionStatus.h
@@ -40,16 +40,12 @@ public:
this->ReturnInvoked = false;
this->BreakInvoked = false;
this->ContinueInvoked = false;
- this->NestedError = false;
}
- void SetNestedError(bool val) { this->NestedError = val; }
- bool GetNestedError() { return this->NestedError; }
private:
bool ReturnInvoked;
bool BreakInvoked;
bool ContinueInvoked;
- bool NestedError;
};
#endif
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 40c54db..f0e4854 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -76,7 +76,7 @@ public:
};
bool cmFunctionHelperCommand::InvokeInitialPass(
- const std::vector<cmListFileArgument>& args, cmExecutionStatus& inStatus)
+ const std::vector<cmListFileArgument>& args, cmExecutionStatus&)
{
// Expand the argument list to the function.
std::vector<std::string> expandedArgs;
@@ -129,11 +129,11 @@ bool cmFunctionHelperCommand::InvokeInitialPass(
for (unsigned int c = 0; c < this->Functions.size(); ++c) {
cmExecutionStatus status;
if (!this->Makefile->ExecuteCommand(this->Functions[c], status) ||
- status.GetNestedError()) {
+ (cmSystemTools::GetErrorOccuredFlag() &&
+ !cmSystemTools::GetFatalErrorOccured())) {
// The error message should have already included the call stack
// so we do not need to report an error here.
functionScope.Quiet();
- inStatus.SetNestedError(true);
return false;
}
if (status.GetReturnInvoked()) {
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index ee9dc8a..9d312ee 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -159,11 +159,11 @@ bool cmMacroHelperCommand::InvokeInitialPass(
}
cmExecutionStatus status;
if (!this->Makefile->ExecuteCommand(newLFF, status) ||
- status.GetNestedError()) {
+ (cmSystemTools::GetErrorOccuredFlag() &&
+ !cmSystemTools::GetFatalErrorOccured())) {
// The error message should have already included the call stack
// so we do not need to report an error here.
macroScope.Quiet();
- inStatus.SetNestedError(true);
return false;
}
if (status.GetReturnInvoked()) {
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a759993..11ccca1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -117,10 +117,6 @@ cmMakefile::~cmMakefile()
void cmMakefile::IssueMessage(cmake::MessageType t,
std::string const& text) const
{
- assert(!this->ExecutionStatusStack.empty());
- if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) {
- this->ExecutionStatusStack.back()->SetNestedError(true);
- }
this->GetCMakeInstance()->IssueMessage(t, text, this->GetBacktrace());
}
@@ -281,11 +277,19 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
if (this->GetCMakeInstance()->GetTrace()) {
this->PrintCommandTrace(lff);
}
- // Try invoking the command.
+
+ bool hadPreviousNonFatalError = cmSystemTools::GetErrorOccuredFlag() &&
+ !cmSystemTools::GetFatalErrorOccured();
+ cmSystemTools::ResetErrorOccuredFlag();
+
bool invokeSucceeded = pcmd->InvokeInitialPass(lff.Arguments, status);
- bool hadNestedError = status.GetNestedError();
+ bool hadNestedError = cmSystemTools::GetErrorOccuredFlag() &&
+ !cmSystemTools::GetFatalErrorOccured();
+ if (hadPreviousNonFatalError) {
+ cmSystemTools::SetErrorOccured();
+ }
if (!invokeSucceeded || hadNestedError) {
- if (!hadNestedError) {
+ if (!hadNestedError && !cmSystemTools::GetFatalErrorOccured()) {
// The command invocation requested that we report an error.
this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError());
}
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-result.txt b/Tests/RunCMake/Configure/ContinueAfterError-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/Configure/ContinueAfterError-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt b/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt
deleted file mode 100644
index f40a3ef..0000000
--- a/Tests/RunCMake/Configure/ContinueAfterError-stderr.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-^CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\):
- error in loop body
-Call Stack \(most recent call first\):
- ContinueAfterError.cmake:[0-9]+ \(m\)
- ContinueAfterError.cmake:[0-9]+ \(f\)
- CMakeLists.txt:[0-9]+ \(include\)
-+
-CMake Error at ContinueAfterError.cmake:[0-9]+ \(message\):
- error in loop body
-Call Stack \(most recent call first\):
- ContinueAfterError.cmake:[0-9]+ \(m\)
- ContinueAfterError.cmake:[0-9]+ \(f\)
- CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt b/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt
deleted file mode 100644
index f03aa07..0000000
--- a/Tests/RunCMake/Configure/ContinueAfterError-stdout.txt
+++ /dev/null
@@ -1,11 +0,0 @@
--- before f
--- start f
--- start m
--- start loop body
--- end loop body
--- start loop body
--- end loop body
--- end m
--- end f
--- after f
--- Configuring incomplete, errors occurred!
diff --git a/Tests/RunCMake/Configure/ContinueAfterError.cmake b/Tests/RunCMake/Configure/ContinueAfterError.cmake
deleted file mode 100644
index d094390..0000000
--- a/Tests/RunCMake/Configure/ContinueAfterError.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
-macro(m)
- message(STATUS " start m")
- foreach(i 1 2)
- message(STATUS " start loop body")
- message(SEND_ERROR "error in loop body")
- message(STATUS " end loop body")
- endforeach()
- message(STATUS " end m")
-endmacro()
-
-function(f)
- message(STATUS " start f")
- m()
- message(STATUS " end f")
-endfunction()
-
-message(STATUS "before f")
-f()
-message(STATUS "after f")
diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake
index 91adb4e..58e1a2a 100644
--- a/Tests/RunCMake/Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake
@@ -1,6 +1,5 @@
include(RunCMake)
-run_cmake(ContinueAfterError)
run_cmake(CustomTargetAfterError)
run_cmake(ErrorLogs)
run_cmake(FailCopyFileABI)
-----------------------------------------------------------------------
Summary of changes:
Source/cmExecutionStatus.h | 4 ----
Source/cmFunctionCommand.cxx | 6 +++---
Source/cmMacroCommand.cxx | 4 ++--
Source/cmMakefile.cxx | 18 +++++++++++-------
.../Configure/ContinueAfterError-result.txt | 1 -
.../Configure/ContinueAfterError-stderr.txt | 13 -------------
.../Configure/ContinueAfterError-stdout.txt | 11 -----------
Tests/RunCMake/Configure/ContinueAfterError.cmake | 19 -------------------
Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 -
9 files changed, 16 insertions(+), 61 deletions(-)
delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-result.txt
delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stderr.txt
delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError-stdout.txt
delete mode 100644 Tests/RunCMake/Configure/ContinueAfterError.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list