| 202 | } |
| 203 | |
| 204 | void cmMessenger::DisplayMessage(MessageType t, std::string const& text, |
| 205 | cmListFileBacktrace const& backtrace) const |
| 206 | { |
| 207 | std::ostringstream msg; |
| 208 | |
| 209 | // Print the message preamble. |
| 210 | msg << "CMake " << getMessageTypeStr(t); |
| 211 | |
| 212 | // Add the immediate context. |
| 213 | this->PrintBacktraceTitle(msg, backtrace); |
| 214 | |
| 215 | printMessageText(msg, text); |
| 216 | |
| 217 | // Add the rest of the context. |
| 218 | PrintCallStack(msg, backtrace, this->TopSource); |
| 219 | |
| 220 | displayMessage(t, msg); |
| 221 | |
| 222 | #ifndef CMAKE_BOOTSTRAP |
| 223 | // Add message to SARIF logs |
| 224 | this->SarifLog.LogMessage(t, text, backtrace); |
| 225 | #endif |
| 226 | |
| 227 | #ifdef CMake_ENABLE_DEBUGGER |
| 228 | if (DebuggerAdapter) { |
| 229 | DebuggerAdapter->OnMessageOutput(t, msg.str()); |
| 230 | } |
| 231 | #endif |
| 232 | } |
| 233 | |
| 234 | void cmMessenger::PrintBacktraceTitle(std::ostream& out, |
| 235 | cmListFileBacktrace const& bt) const |