diff options
author | Brad King <brad.king@kitware.com> | 2019-01-25 12:58:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-25 12:59:11 (GMT) |
commit | 9f84cbd8c323a5a59b666a8bc8199e52a181bb35 (patch) | |
tree | 238b6023b3df2c29e2160c373df263669e954fd8 /Source/cmcmd.cxx | |
parent | 5a6e683a32c8ba9f7610e4ca0c6c3d9e7888d934 (diff) | |
parent | 99337d345ba9d3379135c90854be23403fa8e274 (diff) | |
download | CMake-9f84cbd8c323a5a59b666a8bc8199e52a181bb35.zip CMake-9f84cbd8c323a5a59b666a8bc8199e52a181bb35.tar.gz CMake-9f84cbd8c323a5a59b666a8bc8199e52a181bb35.tar.bz2 |
Merge topic 'error-overloads'
99337d345b cmSystemTools::Error(): new overload accepting std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2845
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index cb59034..f5769f6 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -123,7 +123,7 @@ void CMakeCommandUsage(const char* program) ; /* clang-format on */ - cmSystemTools::Error(errorStream.str().c_str()); + cmSystemTools::Error(errorStream.str()); } static bool cmTarFilesFrom(std::string const& file, @@ -132,14 +132,14 @@ static bool cmTarFilesFrom(std::string const& file, if (cmSystemTools::FileIsDirectory(file)) { std::ostringstream e; e << "-E tar --files-from= file '" << file << "' is a directory"; - cmSystemTools::Error(e.str().c_str()); + cmSystemTools::Error(e.str()); return false; } cmsys::ifstream fin(file.c_str()); if (!fin) { std::ostringstream e; e << "-E tar --files-from= file '" << file << "' not found"; - cmSystemTools::Error(e.str().c_str()); + cmSystemTools::Error(e.str()); return false; } std::string line; @@ -153,7 +153,7 @@ static bool cmTarFilesFrom(std::string const& file, std::ostringstream e; e << "-E tar --files-from='" << file << "' file invalid line:\n" << line << "\n"; - cmSystemTools::Error(e.str().c_str()); + cmSystemTools::Error(e.str()); return false; } else { files.push_back(line); @@ -1172,7 +1172,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) if (server.Serve(&errorMessage)) { return 0; } - cmSystemTools::Error(errorMessage.c_str()); + cmSystemTools::Error(errorMessage); #else static_cast<void>(supportExperimental); static_cast<void>(isDebug); |