summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmIfCommand.cxx6
-rw-r--r--Source/cmMakefile.cxx7
2 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 45395d1..cb5ba76 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -185,12 +185,12 @@ bool cmIfCommand::InvokeInitialPass(
conditionEvaluator.IsTrue(expandedArguments, errorString, status);
if (!errorString.empty()) {
- std::string err = cmIfCommandError(expandedArguments);
+ std::string err = "if " + cmIfCommandError(expandedArguments);
err += errorString;
if (status == cmake::FATAL_ERROR) {
- this->SetError(err);
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, err);
cmSystemTools::SetFatalErrorOccured();
- return false;
+ return true;
} else {
this->Makefile->IssueMessage(status, err);
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 95ca0e2..75d57b5 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -254,9 +254,10 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
this->PrintCommandTrace(lff);
}
// Try invoking the command.
- if (!pcmd->InvokeInitialPass(lff.Arguments, status) ||
- status.GetNestedError()) {
- if (!status.GetNestedError()) {
+ bool invokeSucceeded = pcmd->InvokeInitialPass(lff.Arguments, status);
+ bool hadNestedError = status.GetNestedError();
+ if (!invokeSucceeded || hadNestedError) {
+ if (!hadNestedError) {
// The command invocation requested that we report an error.
this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError());
}