mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-12 23:43:59 +03:00
cmake: Extract printMessageText method.
This commit is contained in:
1 parent
ca7cc2ebd0
commit
55fc5e7c9a
1 file changed
+9
-7
+9
-7
@@ -2477,6 +2477,14 @@ bool cmake::PrintMessagePreamble(cmake::MessageType t, std::ostream& msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
void printMessageText(std::ostream& msg, std::string const& text)
|
||||
{
|
||||
msg << ":\n";
|
||||
cmDocumentationFormatter formatter;
|
||||
formatter.SetIndent(" ");
|
||||
formatter.PrintFormatted(msg, text.c_str());
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
|
||||
cmListFileBacktrace const& bt)
|
||||
@@ -2493,13 +2501,7 @@ void cmake::IssueMessage(cmake::MessageType t, std::string const& text,
|
||||
// Add the immediate context.
|
||||
backtrace.PrintTitle(msg);
|
||||
|
||||
// Add the message text.
|
||||
{
|
||||
msg << ":\n";
|
||||
cmDocumentationFormatter formatter;
|
||||
formatter.SetIndent(" ");
|
||||
formatter.PrintFormatted(msg, text.c_str());
|
||||
}
|
||||
printMessageText(msg, text);
|
||||
|
||||
// Add the rest of the context.
|
||||
backtrace.PrintCallStack(msg);
|
||||
|
||||
Reference in new issue
Block a user