mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmSystemTools: MessageCallback and Message() accept std::string argument
This commit is contained in:
@@ -150,7 +150,7 @@ int main(int argc, char const* const* argv)
|
||||
}
|
||||
|
||||
cmSystemTools::SetMessageCallback(
|
||||
[myform](const char* message, const char* title) {
|
||||
[myform](const std::string& message, const char* title) {
|
||||
myform->AddError(message, title);
|
||||
});
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "cmsys/FStream.hxx"
|
||||
|
||||
#include <string>
|
||||
|
||||
class cmCursesForm
|
||||
{
|
||||
public:
|
||||
@@ -34,7 +36,7 @@ public:
|
||||
// Description:
|
||||
// During a CMake run, an error handle should add errors
|
||||
// to be displayed afterwards.
|
||||
virtual void AddError(const char*, const char*) {}
|
||||
virtual void AddError(const std::string&, const char*) {}
|
||||
|
||||
// Description:
|
||||
// Turn debugging on. This will create ccmakelog.txt.
|
||||
|
||||
@@ -647,7 +647,8 @@ int cmCursesMainForm::Generate()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cmCursesMainForm::AddError(const char* message, const char* /*unused*/)
|
||||
void cmCursesMainForm::AddError(const std::string& message,
|
||||
const char* /*unused*/)
|
||||
{
|
||||
this->Errors.emplace_back(message);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* During a CMake run, an error handle should add errors
|
||||
* to be displayed afterwards.
|
||||
*/
|
||||
void AddError(const char* message, const char* title) override;
|
||||
void AddError(const std::string& message, const char* title) override;
|
||||
|
||||
/**
|
||||
* Used to do a configure. If argument is specified, it does only the check
|
||||
|
||||
Reference in New Issue
Block a user