diff options
author | Brad King <brad.king@kitware.com> | 2016-09-06 19:25:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-06 20:20:39 (GMT) |
commit | f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e (patch) | |
tree | 97df21a517176b2ae5b9420bef437fe8595da443 /Source/cmMacroCommand.cxx | |
parent | 8317ea01aa3cf9319ef907e127fa6dbf9666cc53 (diff) | |
download | CMake-f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e.zip CMake-f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e.tar.gz CMake-f1ad71d7f8c066a7e0d0c11bb1ce9d5a5719ec5e.tar.bz2 |
cmMakefile: Restore nested error logic use of cmExecutionStatus
Since commit 14a8d61f (cmMakefile: Port nested error logic away from
cmExecutionStatus) we fail to continue processing function and macro
bodies after non-fatal errors. A non-fatal error should not stop
foreach loops, macro bodies, nested bodies, or the outer script.
Add a test covering these cases, and revert the change to fix them.
Also revert commit 2af853de (cmMakefile: Simplify IssueMessage
implementation) because the assertion it added (which was removed by the
above commit and is restored by reverting it) is incorrect. We do have
code paths that call cmMakefile::IssueMessage with an empty execution
stack, such as in CheckForUnusedVariables's LogUnused call.
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 9d312ee..ee9dc8a 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -159,11 +159,11 @@ bool cmMacroHelperCommand::InvokeInitialPass( } cmExecutionStatus status; if (!this->Makefile->ExecuteCommand(newLFF, status) || - (cmSystemTools::GetErrorOccuredFlag() && - !cmSystemTools::GetFatalErrorOccured())) { + status.GetNestedError()) { // 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()) { |