diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-06 20:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-07 18:41:27 (GMT) |
commit | 82edd98300b9d050dd28fdfa1e6ea7b18ecca22c (patch) | |
tree | a0bd32bc16a5793f9729cfb82872e4df8f47ad78 /Source/cmakemain.cxx | |
parent | 062cfd991faac000d484c74e5af7d65726c655dc (diff) | |
download | CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.zip CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.gz CMake-82edd98300b9d050dd28fdfa1e6ea7b18ecca22c.tar.bz2 |
cmSystemTools: MessageCallback and Message() accept std::string argument
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 890b74e..a49246b 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -142,8 +142,8 @@ static std::string cmakemainGetStack(cmake* cm) return msg; } -static void cmakemainMessageCallback(const char* m, const char* /*unused*/, - cmake* cm) +static void cmakemainMessageCallback(const std::string& m, + const char* /*unused*/, cmake* cm) { std::cerr << m << cmakemainGetStack(cm) << std::endl << std::flush; } @@ -319,9 +319,10 @@ int do_cmake(int ac, char const* const* av) cmake cm(role, mode); cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); - cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { - cmakemainMessageCallback(msg, title, &cm); - }); + cmSystemTools::SetMessageCallback( + [&cm](const std::string& msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); @@ -499,9 +500,10 @@ static int do_build(int ac, char const* const* av) } cmake cm(cmake::RoleInternal, cmState::Unknown); - cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { - cmakemainMessageCallback(msg, title, &cm); - }); + cmSystemTools::SetMessageCallback( + [&cm](const std::string& msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); @@ -541,9 +543,10 @@ static int do_open(int ac, char const* const* av) } cmake cm(cmake::RoleInternal, cmState::Unknown); - cmSystemTools::SetMessageCallback([&cm](const char* msg, const char* title) { - cmakemainMessageCallback(msg, title, &cm); - }); + cmSystemTools::SetMessageCallback( + [&cm](const std::string& msg, const char* title) { + cmakemainMessageCallback(msg, title, &cm); + }); cm.SetProgressCallback([&cm](const char* msg, float prog) { cmakemainProgressCallback(msg, prog, &cm); }); |