diff options
author | Brad King <brad.king@kitware.com> | 2016-06-13 13:54:27 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-13 13:54:27 (GMT) |
commit | 4e66ca1952c0ba9dfba6050f83f67c90884c8492 (patch) | |
tree | ba64a2020360c326489b43e422a1edf55489880b /Source/cmake.cxx | |
parent | 18e00ac7b918865c38a2e34ee584e18c1126c663 (diff) | |
parent | 23f87e8157770c56d3aa568f3d1318f9b9070364 (diff) | |
download | CMake-4e66ca1952c0ba9dfba6050f83f67c90884c8492.zip CMake-4e66ca1952c0ba9dfba6050f83f67c90884c8492.tar.gz CMake-4e66ca1952c0ba9dfba6050f83f67c90884c8492.tar.bz2 |
Merge topic 'fix-cmake-ISP-violation'
23f87e81 cmake: Remove force from IssueMessage API
54c65d5f cmake: Extract DisplayMessage API.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 98ac518..e404fa3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2294,22 +2294,26 @@ void displayMessage(cmake::MessageType t, std::ostringstream& msg) } void cmake::IssueMessage(cmake::MessageType t, std::string const& text, - cmListFileBacktrace const& backtrace, - bool force) const + cmListFileBacktrace const& backtrace) const { - if (!force) { - // override the message type, if needed, for warnings and errors - cmake::MessageType override = this->ConvertMessageType(t); - if (override != t) { - t = override; - force = true; - } + bool force = false; + // override the message type, if needed, for warnings and errors + cmake::MessageType override = this->ConvertMessageType(t); + if (override != t) { + t = override; + force = true; } if (!force && !this->IsMessageTypeVisible(t)) { return; } + this->DisplayMessage(t, text, backtrace); +} + +void cmake::DisplayMessage(cmake::MessageType t, std::string const& text, + cmListFileBacktrace const& backtrace) const +{ std::ostringstream msg; if (!printMessagePreamble(t, msg)) { return; |