summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-21 22:35:21 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-21 22:54:28 (GMT)
commit46656aa1fa69b79aa0c645a131d7abfdc34e621c (patch)
tree21b90011432e9803c7a2809cb7713dcf9efbc297 /Source
parent55fc5e7c9ad018bbb90fbcee6ac09cf224b46246 (diff)
downloadCMake-46656aa1fa69b79aa0c645a131d7abfdc34e621c.zip
CMake-46656aa1fa69b79aa0c645a131d7abfdc34e621c.tar.gz
CMake-46656aa1fa69b79aa0c645a131d7abfdc34e621c.tar.bz2
cmake: Extract displayMessage method.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx44
1 files changed, 25 insertions, 19 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 565db8b..15ea755 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2485,26 +2485,8 @@ void printMessageText(std::ostream& msg, std::string const& text)
formatter.PrintFormatted(msg, text.c_str());
}
-//----------------------------------------------------------------------------
-void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
- cmListFileBacktrace const& bt)
+void displayMessage(cmake::MessageType t, std::ostringstream& msg)
{
- cmListFileBacktrace backtrace = bt;
- backtrace.MakeRelative();
-
- std::ostringstream msg;
- if (!this->PrintMessagePreamble(t, msg))
- {
- return;
- }
-
- // Add the immediate context.
- backtrace.PrintTitle(msg);
-
- printMessageText(msg, text);
-
- // Add the rest of the context.
- backtrace.PrintCallStack(msg);
// Add a note about warning suppression.
if(t == cmake::AUTHOR_WARNING)
@@ -2547,6 +2529,30 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
}
//----------------------------------------------------------------------------
+void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
+ cmListFileBacktrace const& bt)
+{
+ cmListFileBacktrace backtrace = bt;
+ backtrace.MakeRelative();
+
+ std::ostringstream msg;
+ if (!this->PrintMessagePreamble(t, msg))
+ {
+ return;
+ }
+
+ // Add the immediate context.
+ backtrace.PrintTitle(msg);
+
+ printMessageText(msg, text);
+
+ // Add the rest of the context.
+ backtrace.PrintCallStack(msg);
+
+ displayMessage(t, msg);
+}
+
+//----------------------------------------------------------------------------
std::vector<std::string> cmake::GetDebugConfigs()
{
std::vector<std::string> configs;