cmMakefile: Avoid IssueMessage after configure is finished

This commit is contained in:
Stephen Kelly 2016-01-28 22:10:27 +01:00
parent 096c7754b3
commit 946d1e50dc
1 changed files with 9 additions and 5 deletions

View File

@ -546,7 +546,8 @@ void cmMakefile::EnforceDirectoryLevelRules() const
case cmPolicies::WARN:
// Warn because the user did not provide a mimimum required
// version.
this->IssueMessage(cmake::AUTHOR_WARNING, msg.str());
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,
msg.str(), this->Backtrace);
case cmPolicies::OLD:
// OLD behavior is to use policy version 2.4 set in
// cmListFileCache.
@ -555,7 +556,8 @@ void cmMakefile::EnforceDirectoryLevelRules() const
case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::NEW:
// NEW behavior is to issue an error.
this->IssueMessage(cmake::FATAL_ERROR, msg.str());
this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, msg.str(),
this->Backtrace);
cmSystemTools::SetFatalErrorOccured();
return;
}
@ -651,12 +653,13 @@ void cmMakefile::ConfigureFinalPass()
const char* oldValue = this->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if (oldValue &&
cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, oldValue, "2.4")) {
this->IssueMessage(
this->GetCMakeInstance()->IssueMessage(
cmake::FATAL_ERROR,
"You have set CMAKE_BACKWARDS_COMPATIBILITY to a CMake version less "
"than 2.4. This version of CMake only supports backwards compatibility "
"with CMake 2.4 or later. For compatibility with older versions please "
"use any CMake 2.8.x release or lower.");
"use any CMake 2.8.x release or lower.",
this->Backtrace);
}
}
@ -2048,7 +2051,8 @@ void cmMakefile::ExpandVariablesCMP0019()
<< "The following variable evaluations were encountered:\n"
<< w.str();
/* clang-format on */
this->IssueMessage(cmake::AUTHOR_WARNING, m.str());
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, m.str(),
this->Backtrace);
}
}