diff options
author | Brad King <brad.king@kitware.com> | 2019-09-05 12:24:38 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-05 12:24:50 (GMT) |
commit | fcba9c3baa00631407f493f97afe7e9cd1b844a7 (patch) | |
tree | 86ace1d0378fa1c649181a1ba9cbde3c11f1f654 /Source/CPack | |
parent | f545428be08531d2561feba4854793775be83c39 (diff) | |
parent | e26f0e9dd58b839b880670d6000e7f1ebac1df94 (diff) | |
download | CMake-fcba9c3baa00631407f493f97afe7e9cd1b844a7.zip CMake-fcba9c3baa00631407f493f97afe7e9cd1b844a7.tar.gz CMake-fcba9c3baa00631407f493f97afe7e9cd1b844a7.tar.bz2 |
Merge topic 'cpack-zstd'
e26f0e9dd5 CPack: Add generator for .tar.zst packages
f7085d7b0a cmCPackArchiveGenerator: Code cleanup
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3752
Diffstat (limited to 'Source/CPack')
23 files changed, 106 insertions, 314 deletions
diff --git a/Source/CPack/cmCPack7zGenerator.cxx b/Source/CPack/cmCPack7zGenerator.cxx deleted file mode 100644 index 7413770..0000000 --- a/Source/CPack/cmCPack7zGenerator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPack7zGenerator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPack7zGenerator::cmCPack7zGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "7zip") -{ -} - -cmCPack7zGenerator::~cmCPack7zGenerator() = default; diff --git a/Source/CPack/cmCPack7zGenerator.h b/Source/CPack/cmCPack7zGenerator.h deleted file mode 100644 index 8af4c4a..0000000 --- a/Source/CPack/cmCPack7zGenerator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPack7zGenerator_h -#define cmCPack7zGenerator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPack7zGenerator - * \brief A generator for 7z files - */ -class cmCPack7zGenerator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPack7zGenerator, cmCPackArchiveGenerator); - - /** - * Construct generator - */ - cmCPack7zGenerator(); - ~cmCPack7zGenerator() override; - -protected: - const char* GetOutputExtension() override { return ".7z"; } -}; - -#endif diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 6c9c6b9..1271b08 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -16,11 +16,54 @@ #include <utility> #include <vector> -cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t, - std::string const& format) +cmCPackGenerator* cmCPackArchiveGenerator::Create7ZGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "7zip", + ".7z"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateTBZ2Generator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr", + ".tar.bz2"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateTGZGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr", + ".tar.gz"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateTXZGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr", + ".tar.xz"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateTZGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressCompress, "paxr", + ".tar.Z"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateTZSTGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressZstd, "paxr", + ".tar.zst"); +} + +cmCPackGenerator* cmCPackArchiveGenerator::CreateZIPGenerator() +{ + return new cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "zip", + ".zip"); +} + +cmCPackArchiveGenerator::cmCPackArchiveGenerator( + cmArchiveWrite::Compress compress, std::string format, std::string extension) + : Compress(compress) + , ArchiveFormat(std::move(format)) + , OutputExtension(std::move(extension)) { - this->Compress = t; - this->ArchiveFormat = format; } cmCPackArchiveGenerator::~cmCPackArchiveGenerator() = default; diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 9983854..f5be0aa 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -24,10 +24,19 @@ class cmCPackArchiveGenerator : public cmCPackGenerator public: typedef cmCPackGenerator Superclass; + static cmCPackGenerator* Create7ZGenerator(); + static cmCPackGenerator* CreateTBZ2Generator(); + static cmCPackGenerator* CreateTGZGenerator(); + static cmCPackGenerator* CreateTXZGenerator(); + static cmCPackGenerator* CreateTZGenerator(); + static cmCPackGenerator* CreateTZSTGenerator(); + static cmCPackGenerator* CreateZIPGenerator(); + /** * Construct generator */ - cmCPackArchiveGenerator(cmArchiveWrite::Compress, std::string const& format); + cmCPackArchiveGenerator(cmArchiveWrite::Compress t, std::string format, + std::string extension); ~cmCPackArchiveGenerator() override; // Used to add a header to the archive virtual int GenerateHeader(std::ostream* os); @@ -68,9 +77,19 @@ protected: * components will be put in a single installer. */ int PackageComponentsAllInOne(); - const char* GetOutputExtension() override = 0; + +private: + const char* GetNameOfClass() override { return "cmCPackArchiveGenerator"; } + + const char* GetOutputExtension() override + { + return this->OutputExtension.c_str(); + } + +private: cmArchiveWrite::Compress Compress; std::string ArchiveFormat; + std::string OutputExtension; }; #endif diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx index 553a677..22385055 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -12,6 +12,7 @@ #include "cmsys/SystemTools.hxx" cmCPackCygwinBinaryGenerator::cmCPackCygwinBinaryGenerator() + : cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr", ".tar.bz2") { } diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.h b/Source/CPack/cmCPackCygwinBinaryGenerator.h index f87a134..47bd41e 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.h +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.h @@ -3,15 +3,15 @@ #ifndef cmCPackCygwinBinaryGenerator_h #define cmCPackCygwinBinaryGenerator_h -#include "cmCPackTarBZip2Generator.h" +#include "cmCPackArchiveGenerator.h" /** \class cmCPackCygwinBinaryGenerator * \brief A generator for TarBZip2 files */ -class cmCPackCygwinBinaryGenerator : public cmCPackTarBZip2Generator +class cmCPackCygwinBinaryGenerator : public cmCPackArchiveGenerator { public: - cmCPackTypeMacro(cmCPackCygwinBinaryGenerator, cmCPackTarBZip2Generator); + cmCPackTypeMacro(cmCPackCygwinBinaryGenerator, cmCPackArchiveGenerator); /** * Construct generator diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx index 8cae9b4..5f6aab0 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.cxx +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -20,6 +20,7 @@ #endif cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator() + : cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr", ".tar.bz2") { } @@ -40,11 +41,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles() cmStrCat(this->GetOption("CPACK_TEMPORARY_DIRECTORY"), ".tar.bz2"); packageFileNames[0] = packageDirFileName; std::string output; - // skip one parent up to the cmCPackTarBZip2Generator - // to create tar.bz2 file with the list of source - // files - this->Compress = cmArchiveWrite::CompressBZip2; - if (!this->cmCPackTarBZip2Generator::PackageFiles()) { + // create tar.bz2 file with the list of source files + if (!this->cmCPackArchiveGenerator::PackageFiles()) { return 0; } // Now create a tar file that contains the above .tar.bz2 file @@ -130,7 +128,7 @@ int cmCPackCygwinSourceGenerator::PackageFiles() packageFileNames[0] = outerTarFile; /* update the toplevel dir */ toplevel = tmpDir; - if (!this->cmCPackTarBZip2Generator::PackageFiles()) { + if (!this->cmCPackArchiveGenerator::PackageFiles()) { return 0; } return 1; diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.h b/Source/CPack/cmCPackCygwinSourceGenerator.h index a909b15..98d8f0a 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.h +++ b/Source/CPack/cmCPackCygwinSourceGenerator.h @@ -3,15 +3,15 @@ #ifndef cmCPackCygwinSourceGenerator_h #define cmCPackCygwinSourceGenerator_h -#include "cmCPackTarBZip2Generator.h" +#include "cmCPackArchiveGenerator.h" /** \class cmCPackCygwinSourceGenerator * \brief A generator for cygwin source files */ -class cmCPackCygwinSourceGenerator : public cmCPackTarBZip2Generator +class cmCPackCygwinSourceGenerator : public cmCPackArchiveGenerator { public: - cmCPackTypeMacro(cmCPackCygwinSourceGenerator, cmCPackTarBZip2Generator); + cmCPackTypeMacro(cmCPackCygwinSourceGenerator, cmCPackArchiveGenerator); /** * Construct generator diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx index bbba8a1..3979000 100644 --- a/Source/CPack/cmCPackFreeBSDGenerator.cxx +++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx @@ -21,7 +21,7 @@ #include <utility> cmCPackFreeBSDGenerator::cmCPackFreeBSDGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr") + : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr", ".txz") { } @@ -276,12 +276,6 @@ void write_manifest_files(cmGeneratedFileStream& s, s << " },\n"; } -static bool has_suffix(const std::string& str, const std::string& suffix) -{ - return str.size() >= suffix.size() && - str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; -} - int cmCPackFreeBSDGenerator::PackageFiles() { if (!this->ReadListFile("Internal/CPack/CPackFreeBSD.cmake")) { @@ -327,13 +321,13 @@ int cmCPackFreeBSDGenerator::PackageFiles() pkg_create_from_manifest(output_dir.c_str(), ::TXZ, toplevel.c_str(), manifestname.c_str(), nullptr); - std::string broken_suffix = std::string("-") + - var_lookup("CPACK_TOPLEVEL_TAG") + std::string(GetOutputExtension()); + std::string broken_suffix = + cmStrCat('-', var_lookup("CPACK_TOPLEVEL_TAG"), ".txz"); for (std::string& name : packageFileNames) { cmCPackLogger(cmCPackLog::LOG_DEBUG, "Packagefile " << name << std::endl); - if (has_suffix(name, broken_suffix)) { + if (cmHasSuffix(name, broken_suffix)) { name.replace(name.size() - broken_suffix.size(), std::string::npos, - GetOutputExtension()); + ".txz"); break; } } diff --git a/Source/CPack/cmCPackFreeBSDGenerator.h b/Source/CPack/cmCPackFreeBSDGenerator.h index 99d2e24..80c53b1 100644 --- a/Source/CPack/cmCPackFreeBSDGenerator.h +++ b/Source/CPack/cmCPackFreeBSDGenerator.h @@ -28,8 +28,6 @@ public: int PackageFiles() override; protected: - const char* GetOutputExtension() override { return ".txz"; } - std::string var_lookup(const char* var_name); void write_manifest_fields(cmGeneratedFileStream&); }; diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 2c5ab4d..4d41049 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -7,10 +7,10 @@ #include "IFW/cmCPackIFWGenerator.h" #include "cmAlgorithms.h" -#include "cmCPack7zGenerator.h" #ifdef HAVE_FREEBSD_PKG # include "cmCPackFreeBSDGenerator.h" #endif +#include "cmCPackArchiveGenerator.h" #include "cmCPackDebGenerator.h" #include "cmCPackExternalGenerator.h" #include "cmCPackGenerator.h" @@ -18,11 +18,6 @@ #include "cmCPackNSISGenerator.h" #include "cmCPackNuGetGenerator.h" #include "cmCPackSTGZGenerator.h" -#include "cmCPackTGZGenerator.h" -#include "cmCPackTXZGenerator.h" -#include "cmCPackTarBZip2Generator.h" -#include "cmCPackTarCompressGenerator.h" -#include "cmCPackZIPGenerator.h" #ifdef __APPLE__ # include "cmCPackBundleGenerator.h" @@ -48,13 +43,21 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() { - if (cmCPackTGZGenerator::CanGenerate()) { + if (cmCPackArchiveGenerator::CanGenerate()) { + this->RegisterGenerator("7Z", "7-Zip file format", + cmCPackArchiveGenerator::Create7ZGenerator); + this->RegisterGenerator("TBZ2", "Tar BZip2 compression", + cmCPackArchiveGenerator::CreateTBZ2Generator); this->RegisterGenerator("TGZ", "Tar GZip compression", - cmCPackTGZGenerator::CreateGenerator); - } - if (cmCPackTXZGenerator::CanGenerate()) { + cmCPackArchiveGenerator::CreateTGZGenerator); this->RegisterGenerator("TXZ", "Tar XZ compression", - cmCPackTXZGenerator::CreateGenerator); + 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); } if (cmCPackSTGZGenerator::CanGenerate()) { this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression", @@ -80,29 +83,12 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() cmCPackCygwinSourceGenerator::CreateGenerator); } #endif - - if (cmCPackZIPGenerator::CanGenerate()) { - this->RegisterGenerator("ZIP", "ZIP file format", - cmCPackZIPGenerator::CreateGenerator); - } - if (cmCPack7zGenerator::CanGenerate()) { - this->RegisterGenerator("7Z", "7-Zip file format", - cmCPack7zGenerator::CreateGenerator); - } #if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_LIBUUID)) if (cmCPackWIXGenerator::CanGenerate()) { this->RegisterGenerator("WIX", "MSI file format via WiX tools", cmCPackWIXGenerator::CreateGenerator); } #endif - if (cmCPackTarBZip2Generator::CanGenerate()) { - this->RegisterGenerator("TBZ2", "Tar BZip2 compression", - cmCPackTarBZip2Generator::CreateGenerator); - } - if (cmCPackTarCompressGenerator::CanGenerate()) { - this->RegisterGenerator("TZ", "Tar Compress compression", - cmCPackTarCompressGenerator::CreateGenerator); - } if (cmCPackDebGenerator::CanGenerate()) { this->RegisterGenerator("DEB", "Debian packages", cmCPackDebGenerator::CreateGenerator); diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx index 4666dc2..3092508 100644 --- a/Source/CPack/cmCPackSTGZGenerator.cxx +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -8,12 +8,16 @@ #include <string> #include <vector> +#include "cmArchiveWrite.h" #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmSystemTools.h" #include "cm_sys_stat.h" -cmCPackSTGZGenerator::cmCPackSTGZGenerator() = default; +cmCPackSTGZGenerator::cmCPackSTGZGenerator() + : cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr", ".sh") +{ +} cmCPackSTGZGenerator::~cmCPackSTGZGenerator() = default; diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h index 9cf184b..55e4779 100644 --- a/Source/CPack/cmCPackSTGZGenerator.h +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -5,8 +5,8 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include "cmCPackArchiveGenerator.h" #include "cmCPackGenerator.h" -#include "cmCPackTGZGenerator.h" #include <iosfwd> @@ -14,10 +14,10 @@ * \brief A generator for Self extractable TGZ files * */ -class cmCPackSTGZGenerator : public cmCPackTGZGenerator +class cmCPackSTGZGenerator : public cmCPackArchiveGenerator { public: - cmCPackTypeMacro(cmCPackSTGZGenerator, cmCPackTGZGenerator); + cmCPackTypeMacro(cmCPackSTGZGenerator, cmCPackArchiveGenerator); /** * Construct generator @@ -29,7 +29,6 @@ protected: int PackageFiles() override; int InitializeInternal() override; int GenerateHeader(std::ostream* os) override; - const char* GetOutputExtension() override { return ".sh"; } }; #endif diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx deleted file mode 100644 index 6f4676e..0000000 --- a/Source/CPack/cmCPackTGZGenerator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackTGZGenerator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPackTGZGenerator::cmCPackTGZGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr") -{ -} - -cmCPackTGZGenerator::~cmCPackTGZGenerator() = default; diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h deleted file mode 100644 index 7be3d9d..0000000 --- a/Source/CPack/cmCPackTGZGenerator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackTGZGenerator_h -#define cmCPackTGZGenerator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPackTGZGenerator - * \brief A generator for TGZ files - * - */ -class cmCPackTGZGenerator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPackTGZGenerator, cmCPackArchiveGenerator); - /** - * Construct generator - */ - cmCPackTGZGenerator(); - ~cmCPackTGZGenerator() override; - -protected: - const char* GetOutputExtension() override { return ".tar.gz"; } -}; - -#endif diff --git a/Source/CPack/cmCPackTXZGenerator.cxx b/Source/CPack/cmCPackTXZGenerator.cxx deleted file mode 100644 index ccbccde..0000000 --- a/Source/CPack/cmCPackTXZGenerator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackTXZGenerator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPackTXZGenerator::cmCPackTXZGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr") -{ -} - -cmCPackTXZGenerator::~cmCPackTXZGenerator() = default; diff --git a/Source/CPack/cmCPackTXZGenerator.h b/Source/CPack/cmCPackTXZGenerator.h deleted file mode 100644 index 4aa5973..0000000 --- a/Source/CPack/cmCPackTXZGenerator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackTXZGenerator_h -#define cmCPackTXZGenerator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPackTXZGenerator - * \brief A generator for TXZ files - * - */ -class cmCPackTXZGenerator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPackTXZGenerator, cmCPackArchiveGenerator); - /** - * Construct generator - */ - cmCPackTXZGenerator(); - ~cmCPackTXZGenerator() override; - -protected: - const char* GetOutputExtension() override { return ".tar.xz"; } -}; - -#endif diff --git a/Source/CPack/cmCPackTarBZip2Generator.cxx b/Source/CPack/cmCPackTarBZip2Generator.cxx deleted file mode 100644 index 85abeb1..0000000 --- a/Source/CPack/cmCPackTarBZip2Generator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackTarBZip2Generator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr") -{ -} - -cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator() = default; diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h deleted file mode 100644 index 7975dda..0000000 --- a/Source/CPack/cmCPackTarBZip2Generator.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackTarBZip2Generator_h -#define cmCPackTarBZip2Generator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPackTarBZip2Generator - * \brief A generator for TarBZip2 files - */ -class cmCPackTarBZip2Generator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPackTarBZip2Generator, cmCPackArchiveGenerator); - /** - * Construct generator - */ - cmCPackTarBZip2Generator(); - ~cmCPackTarBZip2Generator() override; - -protected: - const char* GetOutputExtension() override { return ".tar.bz2"; } -}; - -#endif diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx deleted file mode 100644 index 55a6de5..0000000 --- a/Source/CPack/cmCPackTarCompressGenerator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackTarCompressGenerator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressCompress, "paxr") -{ -} - -cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator() = default; diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h deleted file mode 100644 index 37c7f48..0000000 --- a/Source/CPack/cmCPackTarCompressGenerator.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackTarCompressGenerator_h -#define cmCPackTarCompressGenerator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPackTarCompressGenerator - * \brief A generator for TarCompress files - */ -class cmCPackTarCompressGenerator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPackTarCompressGenerator, cmCPackArchiveGenerator); - /** - * Construct generator - */ - cmCPackTarCompressGenerator(); - ~cmCPackTarCompressGenerator() override; - -protected: - const char* GetOutputExtension() override { return ".tar.Z"; } -}; - -#endif diff --git a/Source/CPack/cmCPackZIPGenerator.cxx b/Source/CPack/cmCPackZIPGenerator.cxx deleted file mode 100644 index f06494c..0000000 --- a/Source/CPack/cmCPackZIPGenerator.cxx +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackZIPGenerator.h" - -#include "cmArchiveWrite.h" -#include "cmCPackArchiveGenerator.h" - -cmCPackZIPGenerator::cmCPackZIPGenerator() - : cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "zip") -{ -} - -cmCPackZIPGenerator::~cmCPackZIPGenerator() = default; diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h deleted file mode 100644 index 58ec79e..0000000 --- a/Source/CPack/cmCPackZIPGenerator.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackZIPGenerator_h -#define cmCPackZIPGenerator_h - -#include "cmConfigure.h" // IWYU pragma: keep - -#include "cmCPackArchiveGenerator.h" -#include "cmCPackGenerator.h" - -/** \class cmCPackZIPGenerator - * \brief A generator for ZIP files - */ -class cmCPackZIPGenerator : public cmCPackArchiveGenerator -{ -public: - cmCPackTypeMacro(cmCPackZIPGenerator, cmCPackArchiveGenerator); - - /** - * Construct generator - */ - cmCPackZIPGenerator(); - ~cmCPackZIPGenerator() override; - -protected: - const char* GetOutputExtension() override { return ".zip"; } -}; - -#endif |