diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-21 22:28:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-21 22:54:26 (GMT) |
commit | fa752bf3393e583851b333cc41d2507dc217e9a8 (patch) | |
tree | d88752650eb30aa3e7889819fcb33c5f2457f672 | |
parent | 3541fc73a12a52f87a2faa9790a65651658162d8 (diff) | |
download | CMake-fa752bf3393e583851b333cc41d2507dc217e9a8.zip CMake-fa752bf3393e583851b333cc41d2507dc217e9a8.tar.gz CMake-fa752bf3393e583851b333cc41d2507dc217e9a8.tar.bz2 |
cmake: Move isError determination to a more-natural place.
-rw-r--r-- | Source/cmake.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ebec923..fe727cd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2444,16 +2444,13 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text, backtrace.MakeRelative(); std::ostringstream msg; - bool isError = false; // Construct the message header. if(t == cmake::FATAL_ERROR) { - isError = true; msg << "CMake Error"; } else if(t == cmake::INTERNAL_ERROR) { - isError = true; msg << "CMake Internal Error (please report a bug)"; } else if(t == cmake::LOG) @@ -2463,7 +2460,6 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text, else if(t == cmake::DEPRECATION_ERROR) { msg << "CMake Deprecation Error"; - isError = true; } else if (t == cmake::DEPRECATION_WARNING) { @@ -2526,7 +2522,9 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text, #endif // Output the message. - if(isError) + if(t == cmake::FATAL_ERROR + || t == cmake::INTERNAL_ERROR + || t == cmake::DEPRECATION_ERROR) { cmSystemTools::SetErrorOccured(); cmSystemTools::Message(msg.str().c_str(), "Error"); |