cmMakefile: Simplify IssueMessage implementation

It is only called during configure time when the execution stack is
non-empty.
This commit is contained in:
Stephen Kelly 2016-01-28 22:10:28 +01:00 committed by Brad King
parent 33bb9cfa36
commit 2af853deb5
1 changed files with 3 additions and 5 deletions

View File

@ -115,11 +115,9 @@ cmMakefile::~cmMakefile()
void cmMakefile::IssueMessage(cmake::MessageType t,
std::string const& text) const
{
// Collect context information.
if (!this->ExecutionStatusStack.empty()) {
if ((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) {
this->ExecutionStatusStack.back()->SetNestedError(true);
}
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());
}