summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-08-28 20:05:45 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-04 17:05:22 (GMT)
commite26f0e9dd58b839b880670d6000e7f1ebac1df94 (patch)
tree34ec16d79ceaaa538c5a645cf2c68676223f4104
parentf7085d7b0a0d4cced41669b498a3d03c4a1e65df (diff)
downloadCMake-e26f0e9dd58b839b880670d6000e7f1ebac1df94.zip
CMake-e26f0e9dd58b839b880670d6000e7f1ebac1df94.tar.gz
CMake-e26f0e9dd58b839b880670d6000e7f1ebac1df94.tar.bz2
CPack: Add generator for .tar.zst packages
-rw-r--r--Help/cpack_gen/archive.rst1
-rw-r--r--Help/release/dev/cpack-zstd.rst5
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.h1
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx2
5 files changed, 15 insertions, 0 deletions
diff --git a/Help/cpack_gen/archive.rst b/Help/cpack_gen/archive.rst
index b288aad..d455f4b 100644
--- a/Help/cpack_gen/archive.rst
+++ b/Help/cpack_gen/archive.rst
@@ -9,6 +9,7 @@ different formats:
- TGZ (.tar.gz)
- TXZ (.tar.xz)
- TZ (.tar.Z)
+ - TZST (.tar.zst)
- ZIP (.zip)
Variables specific to CPack Archive generator
diff --git a/Help/release/dev/cpack-zstd.rst b/Help/release/dev/cpack-zstd.rst
new file mode 100644
index 0000000..e1e64a2
--- /dev/null
+++ b/Help/release/dev/cpack-zstd.rst
@@ -0,0 +1,5 @@
+cpack-zstd
+----------
+
+* The :cpack_gen:`CPack Archive Generator` learned to generate `.tar.zst`
+ packages with Zstandard compression.
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index e9338f2..1271b08 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -46,6 +46,12 @@ cmCPackGenerator* cmCPackArchiveGenerator::CreateTZGenerator()
".tar.Z");
}
+cmCPackGenerator* cmCPackArchiveGenerator::CreateTZSTGenerator()
+{
+ return new cmCPackArchiveGenerator(cmArchiveWrite::CompressZstd, "paxr",
+ ".tar.zst");
+}
+
cmCPackGenerator* cmCPackArchiveGenerator::CreateZIPGenerator()
{
return new cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "zip",
diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h
index 9bd1ede..f5be0aa 100644
--- a/Source/CPack/cmCPackArchiveGenerator.h
+++ b/Source/CPack/cmCPackArchiveGenerator.h
@@ -29,6 +29,7 @@ public:
static cmCPackGenerator* CreateTGZGenerator();
static cmCPackGenerator* CreateTXZGenerator();
static cmCPackGenerator* CreateTZGenerator();
+ static cmCPackGenerator* CreateTZSTGenerator();
static cmCPackGenerator* CreateZIPGenerator();
/**
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index f230871..4d41049 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -54,6 +54,8 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
cmCPackArchiveGenerator::CreateTXZGenerator);
this->RegisterGenerator("TZ", "Tar Compress compression",
cmCPackArchiveGenerator::CreateTZGenerator);
+ this->RegisterGenerator("TZST", "Tar Zstandard compression",
+ cmCPackArchiveGenerator::CreateTZSTGenerator);
this->RegisterGenerator("ZIP", "ZIP file format",
cmCPackArchiveGenerator::CreateZIPGenerator);
}