1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

cmMessenger: Pass title inside a metadata structure

This commit is contained in:
Marius Messerschmidt
2021-05-08 22:30:35 +02:00
committed by Brad King
parent 82fd8b6ba3
commit bceb8e2ed2
9 changed files with 50 additions and 19 deletions

View File

@@ -19,6 +19,7 @@
#include "cmCursesStandardIncludes.h"
#include "cmDocumentation.h"
#include "cmDocumentationEntry.h" // IWYU pragma: keep
#include "cmMessageMetadata.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -181,8 +182,8 @@ int main(int argc, char const* const* argv)
return msg;
};
cmSystemTools::SetMessageCallback(
[&](const std::string& message, const char* title) {
myform->AddError(cleanMessage(message), title);
[&](const std::string& message, const cmMessageMetadata& md) {
myform->AddError(cleanMessage(message), md.title);
});
cmSystemTools::SetStderrCallback([&](const std::string& message) {
myform->AddError(cleanMessage(message), "");