[Cmake-commits] CMake branch, next, updated. v3.1.0-1584-g9ee6a71
Ben Boeckel
ben.boeckel at kitware.com
Thu Jan 8 16:59:53 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 9ee6a717826db91829196a59e02bcf73d216bf87 (commit)
via dd94f7c8233489388b5aea6418bfb8002ab855cc (commit)
via b0a5d3932d2a6633d05eca3eb7fd632f433dca05 (commit)
from fb08194fa34fa33379de6c01cf72278d1da4bf90 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ee6a717826db91829196a59e02bcf73d216bf87
commit 9ee6a717826db91829196a59e02bcf73d216bf87
Merge: fb08194 dd94f7c
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Jan 8 16:59:52 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 8 16:59:52 2015 -0500
Merge topic 'add-xz-support' into next
dd94f7c8 cmake -E tar: add support for .xz files with 'J'
b0a5d393 cmake -E tar: clean up flag documentation
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd94f7c8233489388b5aea6418bfb8002ab855cc
commit dd94f7c8233489388b5aea6418bfb8002ab855cc
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Jan 8 16:56:33 2015 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Jan 8 16:59:36 2015 -0500
cmake -E tar: add support for .xz files with 'J'
diff --git a/Help/release/dev/add-xz-support.rst b/Help/release/dev/add-xz-support.rst
new file mode 100644
index 0000000..0dcea9c
--- /dev/null
+++ b/Help/release/dev/add-xz-support.rst
@@ -0,0 +1,5 @@
+add-xz-support
+--------------
+
+The :manual:`cmake(1)` ``-E tar`` command now supports creating
+``.xz``-compressed archives with the ``J`` flag.
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 80dbaf3..f02d78e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1674,7 +1674,8 @@ std::string cmCTest::Base64GzipEncodeFile(std::string file)
std::vector<std::string> files;
files.push_back(file);
- if(!cmSystemTools::CreateTar(tarFile.c_str(), files, true, false, false))
+ if(!cmSystemTools::CreateTar(tarFile.c_str(), files,
+ true, false, false, false))
{
cmCTestLog(this, ERROR_MESSAGE, "Error creating tar while "
"encoding file: " << file << std::endl);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 1c8c387..cd63347 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1482,7 +1482,8 @@ bool cmSystemTools::IsPathToFramework(const char* path)
bool cmSystemTools::CreateTar(const char* outFileName,
const std::vector<std::string>& files,
- bool gzip, bool bzip2, bool verbose)
+ bool gzip, bool bzip2, bool xz,
+ bool verbose)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
@@ -1498,7 +1499,8 @@ bool cmSystemTools::CreateTar(const char* outFileName,
}
cmArchiveWrite a(fout, (gzip? cmArchiveWrite::CompressGZip :
(bzip2? cmArchiveWrite::CompressBZip2 :
- cmArchiveWrite::CompressNone)),
+ (xz? cmArchiveWrite::CompressXZ :
+ cmArchiveWrite::CompressNone))),
cmArchiveWrite::TypeTAR);
a.SetVerbose(verbose);
for(std::vector<std::string>::const_iterator i = files.begin();
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index d49af74..47d2771 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -387,7 +387,7 @@ public:
bool gzip, bool verbose);
static bool CreateTar(const char* outFileName,
const std::vector<std::string>& files, bool gzip,
- bool bzip2, bool verbose);
+ bool bzip2, bool xz, bool verbose);
static bool ExtractTar(const char* inFileName, bool gzip,
bool verbose);
// This should be called first thing in main
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index f2f028a..6b3efb5 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -71,7 +71,7 @@ void CMakeCommandUsage(const char* program)
<< " remove_directory dir - remove a directory and its contents\n"
<< " rename oldname newname - rename a file or directory "
"(on one volume)\n"
- << " tar [cxt][vf][zj] file.tar [file/dir1 file/dir2 ...]\n"
+ << " tar [cxt][vf][zjJ] file.tar [file/dir1 file/dir2 ...]\n"
<< " - create or extract a tar or zip archive\n"
<< " sleep <number>... - sleep for given number of seconds\n"
<< " time command [args] ... - run command and return elapsed time\n"
@@ -735,11 +735,16 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
}
bool gzip = false;
bool bzip2 = false;
+ bool xz = false;
bool verbose = false;
if ( flags.find_first_of('j') != flags.npos )
{
bzip2 = true;
}
+ if ( flags.find_first_of('J') != flags.npos )
+ {
+ xz = true;
+ }
if ( flags.find_first_of('z') != flags.npos )
{
gzip = true;
@@ -760,7 +765,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
else if ( flags.find_first_of('c') != flags.npos )
{
if ( !cmSystemTools::CreateTar(
- outFile.c_str(), files, gzip, bzip2, verbose) )
+ outFile.c_str(), files, gzip, bzip2, xz, verbose) )
{
cmSystemTools::Error("Problem creating tar: ", outFile.c_str());
return 1;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0a5d3932d2a6633d05eca3eb7fd632f433dca05
commit b0a5d3932d2a6633d05eca3eb7fd632f433dca05
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Jan 8 16:56:17 2015 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Jan 8 16:56:17 2015 -0500
cmake -E tar: clean up flag documentation
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index a97444d..f2f028a 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -71,7 +71,7 @@ void CMakeCommandUsage(const char* program)
<< " remove_directory dir - remove a directory and its contents\n"
<< " rename oldname newname - rename a file or directory "
"(on one volume)\n"
- << " tar [cxt][vfz][cvfj] file.tar [file/dir1 file/dir2 ...]\n"
+ << " tar [cxt][vf][zj] file.tar [file/dir1 file/dir2 ...]\n"
<< " - create or extract a tar or zip archive\n"
<< " sleep <number>... - sleep for given number of seconds\n"
<< " time command [args] ... - run command and return elapsed time\n"
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/add-xz-support.rst | 5 +++++
Source/cmCTest.cxx | 3 ++-
Source/cmSystemTools.cxx | 6 ++++--
Source/cmSystemTools.h | 2 +-
Source/cmcmd.cxx | 9 +++++++--
5 files changed, 19 insertions(+), 6 deletions(-)
create mode 100644 Help/release/dev/add-xz-support.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list