summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-01-28 21:10:29 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-25 13:47:26 (GMT)
commit14a8d61fd49a9b990cbef7e1495e4763f31c55f2 (patch)
tree5f680dfd5058708d30cea6442060a25c374849ff /Source/cmMakefile.cxx
parent2af853deb5225a9c8cb3d1e6311680c3fb7d86aa (diff)
downloadCMake-14a8d61fd49a9b990cbef7e1495e4763f31c55f2.zip
CMake-14a8d61fd49a9b990cbef7e1495e4763f31c55f2.tar.gz
CMake-14a8d61fd49a9b990cbef7e1495e4763f31c55f2.tar.bz2
cmMakefile: Port nested error logic away from cmExecutionStatus
It is no longer needed.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d299b8b..6c83b06 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -115,10 +115,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());
}
@@ -279,11 +275,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());
}