diff options
author | Brad King <brad.king@kitware.com> | 2019-05-30 13:53:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-30 13:57:11 (GMT) |
commit | 6e8acc51a57e60aff307e4730c8a2314e5cf737a (patch) | |
tree | 683727e09698ab349c1a6a92238e0dd2c3d647f8 /Source/cmSystemTools.cxx | |
parent | 9dad42d21a67592040d1100882147eed77753392 (diff) | |
parent | 57cedb18c097a7231223b8a4279534216cad1b93 (diff) | |
download | CMake-6e8acc51a57e60aff307e4730c8a2314e5cf737a.zip CMake-6e8acc51a57e60aff307e4730c8a2314e5cf737a.tar.gz CMake-6e8acc51a57e60aff307e4730c8a2314e5cf737a.tar.bz2 |
Merge topic 'string-tar'
57cedb18c0 cmSystemTools: std::string parameters for tar functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3392
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 8b9a517..1501481 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1529,7 +1529,7 @@ bool cmSystemTools::IsPathToFramework(const std::string& path) cmHasLiteralSuffix(path, ".framework")); } -bool cmSystemTools::CreateTar(const char* outFileName, +bool cmSystemTools::CreateTar(const std::string& outFileName, const std::vector<std::string>& files, cmTarCompression compressType, bool verbose, std::string const& mtime, @@ -1537,7 +1537,7 @@ bool cmSystemTools::CreateTar(const char* outFileName, { #if defined(CMAKE_BUILD_WITH_CMAKE) std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); - cmsys::ofstream fout(outFileName, std::ios::out | std::ios::binary); + cmsys::ofstream fout(outFileName.c_str(), std::ios::out | std::ios::binary); if (!fout) { std::string e = "Cannot open output file \""; e += outFileName; @@ -1760,7 +1760,7 @@ bool copy_data(struct archive* ar, struct archive* aw) # endif } -bool extract_tar(const char* outFileName, +bool extract_tar(const std::string& outFileName, const std::vector<std::string>& files, bool verbose, bool extract) { @@ -1786,7 +1786,7 @@ bool extract_tar(const char* outFileName, } } - int r = cm_archive_read_open_file(a, outFileName, 10240); + int r = cm_archive_read_open_file(a, outFileName.c_str(), 10240); if (r) { ArchiveError("Problem with archive_read_open_file(): ", a); archive_write_free(ext); @@ -1881,7 +1881,7 @@ bool extract_tar(const char* outFileName, } #endif -bool cmSystemTools::ExtractTar(const char* outFileName, +bool cmSystemTools::ExtractTar(const std::string& outFileName, const std::vector<std::string>& files, bool verbose) { @@ -1895,7 +1895,7 @@ bool cmSystemTools::ExtractTar(const char* outFileName, #endif } -bool cmSystemTools::ListTar(const char* outFileName, +bool cmSystemTools::ListTar(const std::string& outFileName, const std::vector<std::string>& files, bool verbose) { |