summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-04-07 10:36:52 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-10 12:32:31 (GMT)
commitd2cc580704fa4e608eae104ce5be211a229b2d64 (patch)
treefd9459775349e127095719de4252c790b781fd02 /Source/cmSystemTools.cxx
parent1264c5b2c485416128466510c42ab40a03eb0ca3 (diff)
downloadCMake-d2cc580704fa4e608eae104ce5be211a229b2d64.zip
CMake-d2cc580704fa4e608eae104ce5be211a229b2d64.tar.gz
CMake-d2cc580704fa4e608eae104ce5be211a229b2d64.tar.bz2
cmake: Teach "-E tar" command a "--format=" option
Allows specifying a libarchive defined archive format currently restricted to 7zip, gnutar, pax, paxr and zip. The default is "paxr" (pax restricted).
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5264123..95d05a6 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1475,7 +1475,8 @@ bool cmSystemTools::IsPathToFramework(const char* path)
bool cmSystemTools::CreateTar(const char* outFileName,
const std::vector<std::string>& files,
cmTarCompression compressType,
- bool verbose, std::string const& mtime)
+ bool verbose, std::string const& mtime,
+ std::string const& format)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
@@ -1505,8 +1506,10 @@ bool cmSystemTools::CreateTar(const char* outFileName,
compress = cmArchiveWrite::CompressNone;
break;
}
+
cmArchiveWrite a(fout, compress,
- cmArchiveWrite::TypeTAR);
+ format.empty() ? "paxr" : format);
+
a.SetMTime(mtime);
a.SetVerbose(verbose);
for(std::vector<std::string>::const_iterator i = files.begin();