summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGeneratorFactory.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-08-28 19:36:38 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-04 17:05:22 (GMT)
commitf7085d7b0a0d4cced41669b498a3d03c4a1e65df (patch)
tree51374aad15cc332b0337155ed3ab3c9d9c8f5d1b /Source/CPack/cmCPackGeneratorFactory.cxx
parent787765d4025cd1caa842d9bcfcf6cd71222b9d44 (diff)
downloadCMake-f7085d7b0a0d4cced41669b498a3d03c4a1e65df.zip
CMake-f7085d7b0a0d4cced41669b498a3d03c4a1e65df.tar.gz
CMake-f7085d7b0a0d4cced41669b498a3d03c4a1e65df.tar.bz2
cmCPackArchiveGenerator: Code cleanup
Diffstat (limited to 'Source/CPack/cmCPackGeneratorFactory.cxx')
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx40
1 files changed, 12 insertions, 28 deletions
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index 2c5ab4d..f230871 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,19 @@
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("ZIP", "ZIP file format",
+ cmCPackArchiveGenerator::CreateZIPGenerator);
}
if (cmCPackSTGZGenerator::CanGenerate()) {
this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
@@ -80,29 +81,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);