summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorMarius Messerschmidt <marius.messerschmidt@googlemail.com>2021-05-08 20:30:35 (GMT)
committerBrad King <brad.king@kitware.com>2021-05-19 13:06:27 (GMT)
commitbceb8e2ed23340a90d2093e05d50f0cc797f6432 (patch)
tree01e3f1a9142ffa35813617296b49b1c335cc7f5e /Source/cmakemain.cxx
parent82fd8b6ba36658705fc55bc40df0b6b6ec80b773 (diff)
downloadCMake-bceb8e2ed23340a90d2093e05d50f0cc797f6432.zip
CMake-bceb8e2ed23340a90d2093e05d50f0cc797f6432.tar.gz
CMake-bceb8e2ed23340a90d2093e05d50f0cc797f6432.tar.bz2
cmMessenger: Pass title inside a metadata structure
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index ad64818..60ac0ca 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -38,6 +38,8 @@
#include "cmsys/Encoding.hxx"
+struct cmMessageMetadata;
+
namespace {
#ifndef CMAKE_BOOTSTRAP
const char* cmDocumentationName[][2] = {
@@ -147,8 +149,8 @@ std::string cmakemainGetStack(cmake* cm)
return msg;
}
-void cmakemainMessageCallback(const std::string& m, const char* /*unused*/,
- cmake* cm)
+void cmakemainMessageCallback(const std::string& m,
+ const cmMessageMetadata& /* unused */, cmake* cm)
{
std::cerr << m << cmakemainGetStack(cm) << std::endl;
}
@@ -342,8 +344,8 @@ int do_cmake(int ac, char const* const* av)
cm.SetHomeDirectory("");
cm.SetHomeOutputDirectory("");
cmSystemTools::SetMessageCallback(
- [&cm](const std::string& msg, const char* title) {
- cmakemainMessageCallback(msg, title, &cm);
+ [&cm](const std::string& msg, const cmMessageMetadata& md) {
+ cmakemainMessageCallback(msg, md, &cm);
});
cm.SetProgressCallback([&cm](const std::string& msg, float prog) {
cmakemainProgressCallback(msg, prog, &cm);
@@ -624,8 +626,8 @@ int do_build(int ac, char const* const* av)
cmake cm(cmake::RoleInternal, cmState::Project);
cmSystemTools::SetMessageCallback(
- [&cm](const std::string& msg, const char* title) {
- cmakemainMessageCallback(msg, title, &cm);
+ [&cm](const std::string& msg, const cmMessageMetadata& md) {
+ cmakemainMessageCallback(msg, md, &cm);
});
cm.SetProgressCallback([&cm](const std::string& msg, float prog) {
cmakemainProgressCallback(msg, prog, &cm);
@@ -857,8 +859,8 @@ int do_install(int ac, char const* const* av)
cmake cm(cmake::RoleScript, cmState::Script);
cmSystemTools::SetMessageCallback(
- [&cm](const std::string& msg, const char* title) {
- cmakemainMessageCallback(msg, title, &cm);
+ [&cm](const std::string& msg, const cmMessageMetadata& md) {
+ cmakemainMessageCallback(msg, md, &cm);
});
cm.SetProgressCallback([&cm](const std::string& msg, float prog) {
cmakemainProgressCallback(msg, prog, &cm);
@@ -938,8 +940,8 @@ int do_open(int ac, char const* const* av)
cmake cm(cmake::RoleInternal, cmState::Unknown);
cmSystemTools::SetMessageCallback(
- [&cm](const std::string& msg, const char* title) {
- cmakemainMessageCallback(msg, title, &cm);
+ [&cm](const std::string& msg, const cmMessageMetadata& md) {
+ cmakemainMessageCallback(msg, md, &cm);
});
cm.SetProgressCallback([&cm](const std::string& msg, float prog) {
cmakemainProgressCallback(msg, prog, &cm);