diff options
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 508a263..cbba2d3 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -76,6 +76,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, } else { + // Place this call on the call stack. + cmMakefileCall stack_manager(&mf, this->Functions[c], status); + static_cast<void>(stack_manager); + std::string errorString; std::vector<std::string> expandedArguments; @@ -98,8 +102,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, err += "("; err += errorString; err += ")."; - cmSystemTools::Error(err.c_str()); - return false; + mf.IssueMessage(cmake::FATAL_ERROR, err); + cmSystemTools::SetFatalErrorOccured(); + mf.RemoveFunctionBlocker(lff); + return true; } if (isTrue) @@ -204,6 +210,7 @@ bool cmIfCommand err += errorString; err += ")."; this->SetError(err.c_str()); + cmSystemTools::SetFatalErrorOccured(); return false; } |