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

View File

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