summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;