diff options
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 6c9c6b9..e9338f2 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -16,11 +16,48 @@ #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::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; |