CPack: include what you use

This commit is contained in:
Daniel Pfeifer 2016-09-07 00:21:35 +02:00
parent 8317ea01aa
commit d47c7bf608
38 changed files with 229 additions and 81 deletions

View File

@ -12,21 +12,20 @@
#include "cmCPackIFWGenerator.h"
#include <CPack/cmCPackComponentGroup.h>
#include <CPack/cmCPackLog.h>
#include "CPack/cmCPackComponentGroup.h"
#include "CPack/cmCPackGenerator.h"
#include "CPack/cmCPackLog.h"
#include "cmCPackIFWInstaller.h"
#include "cmCPackIFWPackage.h"
#include "cmCPackIFWRepository.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmVersionConfig.h"
#include "cmXMLWriter.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/SystemTools.hxx>
#include <cmGeneratedFileStream.h>
#include <cmGlobalGenerator.h>
#include <cmMakefile.h>
#include <cmSystemTools.h>
#include <cmTimestamp.h>
#include <cmVersionConfig.h>
#include <cmXMLWriter.h>
#include <sstream>
#include <utility>
cmCPackIFWGenerator::cmCPackIFWGenerator()
{

View File

@ -13,11 +13,19 @@
#ifndef cmCPackIFWGenerator_h
#define cmCPackIFWGenerator_h
#include <CPack/cmCPackGenerator.h>
#include <cmConfigure.h>
#include "CPack/cmCPackComponentGroup.h"
#include "CPack/cmCPackGenerator.h"
#include "cmCPackIFWInstaller.h"
#include "cmCPackIFWPackage.h"
#include "cmCPackIFWRepository.h"
#include "cmTypeMacro.h"
#include <map>
#include <set>
#include <string>
#include <vector>
class cmXMLWriter;

View File

@ -12,12 +12,16 @@
#include "cmCPackIFWInstaller.h"
#include "CPack/cmCPackGenerator.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackIFWPackage.h"
#include "cmCPackIFWRepository.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmXMLWriter.h"
#include <CPack/cmCPackLog.h>
#include <cmGeneratedFileStream.h>
#include <cmXMLWriter.h>
#include <cmConfigure.h>
#include <utility>
#ifdef cmCPackLogger
#undef cmCPackLogger

View File

@ -13,10 +13,14 @@
#ifndef cmCPackIFWInstaller_h
#define cmCPackIFWInstaller_h
#include <cmStandardIncludes.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include <map>
#include <string>
#include <vector>
class cmCPackIFWPackage;
class cmCPackIFWGenerator;
class cmCPackIFWPackage;
class cmCPackIFWRepository;
class cmXMLWriter;

View File

@ -12,13 +12,20 @@
#include "cmCPackIFWPackage.h"
#include "CPack/cmCPackComponentGroup.h"
#include "CPack/cmCPackGenerator.h"
#include "CPack/cmCPackLog.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackIFWInstaller.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmXMLWriter.h"
#include <CPack/cmCPackLog.h>
#include <cmGeneratedFileStream.h>
#include <cmTimestamp.h>
#include <cmXMLWriter.h>
#include <cmConfigure.h>
#include <map>
#include <sstream>
#include <stddef.h>
//----------------------------------------------------------------- Logger ---
#ifdef cmCPackLogger

View File

@ -13,12 +13,16 @@
#ifndef cmCPackIFWPackage_h
#define cmCPackIFWPackage_h
#include <cmStandardIncludes.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include <set>
#include <string>
#include <vector>
class cmCPackComponent;
class cmCPackComponentGroup;
class cmCPackIFWInstaller;
class cmCPackIFWGenerator;
class cmCPackIFWInstaller;
class cmXMLWriter;
/** \class cmCPackIFWPackage

View File

@ -12,13 +12,15 @@
#include "cmCPackIFWRepository.h"
#include "CPack/cmCPackGenerator.h"
#include "cmCPackIFWGenerator.h"
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
#include "cmXMLWriter.h"
#include <CPack/cmCPackLog.h>
#include <cmGeneratedFileStream.h>
#include <cmXMLParser.h>
#include <cmXMLWriter.h>
#include <cmConfigure.h>
#include <stddef.h>
#ifdef cmCPackLogger
#undef cmCPackLogger

View File

@ -13,7 +13,10 @@
#ifndef cmCPackIFWRepository_h
#define cmCPackIFWRepository_h
#include <cmStandardIncludes.h>
#include <cmConfigure.h> // IWYU pragma: keep
#include <string>
#include <vector>
class cmCPackIFWGenerator;
class cmXMLWriter;

View File

@ -12,6 +12,9 @@
#include "cmCPack7zGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPack7zGenerator::cmCPack7zGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "7zip")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPack7zGenerator_h
#define cmCPack7zGenerator_h
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPack7zGenerator
* \brief A generator for 7z files

View File

@ -12,17 +12,16 @@
#include "cmCPackArchiveGenerator.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <errno.h>
#include <cm_libarchive.h>
#include <cmsys/Directory.hxx>
#include <cmsys/SystemTools.hxx>
#include <map>
#include <ostream>
#include <utility>
#include <vector>
cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t,
std::string const& format)

View File

@ -13,9 +13,16 @@
#ifndef cmCPackArchiveGenerator_h
#define cmCPackArchiveGenerator_h
#include "cmCPackGenerator.h"
#include <cmConfigure.h>
#include "cmArchiveWrite.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <string>
class cmCPackComponent;
/** \class cmCPackArchiveGenerator
* \brief A generator base for libarchive generation.

View File

@ -15,7 +15,8 @@
#include <cmConfigure.h>
#include "cmStandardIncludes.h"
#include <string>
#include <vector>
class cmCPackComponentGroup;

View File

@ -13,16 +13,21 @@
#include "cmCPackDebGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include <cmsys/Glob.hxx>
#include <cmsys/SystemTools.hxx>
#include <limits.h> // USHRT_MAX
#include <limits.h>
#include <map>
#include <ostream>
#include <set>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <utility>
// NOTE:
// A debian package .deb is simply an 'ar' archive. The only subtle difference
@ -743,14 +748,6 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
* SUCH DAMAGE.
*/
#include <sys/types.h>
// include sys/stat.h after sys/types.h
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ARMAG "!<arch>\n" /* ar "magic number" */
#define SARMAG 8 /* strlen(ARMAG); */

View File

@ -13,7 +13,13 @@
#ifndef cmCPackDebGenerator_h
#define cmCPackDebGenerator_h
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <string>
#include <vector>
/** \class cmCPackDebGenerator
* \brief A generator for Debian packages

View File

@ -17,14 +17,17 @@
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmXMLSafe.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include <algorithm>
#include <cmsys/FStream.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/SystemTools.hxx>
#include <cmsys/RegularExpression.hxx>
#include <list>
#include <utility>
#if defined(__HAIKU__)
#include <FindDirectory.h>

View File

@ -13,15 +13,21 @@
#ifndef cmCPackGenerator_h
#define cmCPackGenerator_h
#include "cmObject.h"
#include <cmConfigure.h>
#include "cmCPackComponentGroup.h"
#include "cmObject.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include <map>
#include <sstream>
#include <string>
#include <vector>
#include "cmCPackComponentGroup.h" // cmCPackComponent and friends
// Forward declarations are insufficient since we use them in
// std::map data members below...
class cmCPackLog;
class cmInstalledFile;
class cmMakefile;
#define cmCPackTypeMacro(klass, superclass) \
cmTypeMacro(klass, superclass); \
@ -46,10 +52,6 @@
#endif
#define cout no_cout_use_cmCPack_Log
class cmMakefile;
class cmCPackLog;
class cmInstalledFile;
/** \class cmCPackGenerator
* \brief A superclass of all CPack Generators
*

View File

@ -49,6 +49,9 @@
#include "cmAlgorithms.h"
#include "cmCPackLog.h"
#include <ostream>
#include <utility>
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
{
if (cmCPackTGZGenerator::CanGenerate()) {

View File

@ -13,10 +13,17 @@
#ifndef cmCPackGeneratorFactory_h
#define cmCPackGeneratorFactory_h
#include "cmObject.h"
#include <cmConfigure.h>
#include "cmObject.h"
#include "cmTypeMacro.h"
#include <map>
#include <string>
#include <vector>
class cmCPackLog;
class cmCPackGenerator;
class cmCPackLog;
/** \class cmCPackGeneratorFactory
* \brief A container for CPack generators

View File

@ -15,6 +15,8 @@
#include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
#include <iostream>
cmCPackLog::cmCPackLog()
{
this->Verbose = false;

View File

@ -13,7 +13,14 @@
#ifndef cmCPackLog_h
#define cmCPackLog_h
#include <cmConfigure.h>
#include "cmObject.h"
#include "cmTypeMacro.h"
#include <ostream>
#include <string.h>
#include <string>
#define cmCPack_Log(ctSelf, logType, msg) \
do { \

View File

@ -13,16 +13,19 @@
#include "cmCPackNSISGenerator.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include <algorithm>
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/SystemTools.hxx>
#include <map>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <utility>
/* NSIS uses different command line syntax on Windows and others */
#ifdef _WIN32

View File

@ -13,9 +13,18 @@
#ifndef cmCPackNSISGenerator_h
#define cmCPackNSISGenerator_h
#include "cmCPackGenerator.h"
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
#include <set>
#include <string>
#include <vector>
class cmCPackComponent;
class cmCPackComponentGroup;
/** \class cmCPackNSISGenerator
* \brief A generator for NSIS files

View File

@ -11,9 +11,17 @@
============================================================================*/
#include "cmCPackRPMGenerator.h"
#include "cmCPackComponentGroup.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmSystemTools.h"
#include <algorithm>
#include <map>
#include <ostream>
#include <utility>
#include <vector>
cmCPackRPMGenerator::cmCPackRPMGenerator()
{
}

View File

@ -13,7 +13,12 @@
#ifndef cmCPackRPMGenerator_h
#define cmCPackRPMGenerator_h
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
#include <string>
/** \class cmCPackRPMGenerator
* \brief A generator for RPM packages

View File

@ -12,13 +12,15 @@
#include "cmCPackSTGZGenerator.h"
#include "cmCPackGenerator.h"
#include "cmCPackLog.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include <cmsys/FStream.hxx>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#include <sys/types.h>
// include sys/stat.h after sys/types.h

View File

@ -13,7 +13,13 @@
#ifndef cmCPackSTGZGenerator_h
#define cmCPackSTGZGenerator_h
#include <cmConfigure.h>
#include "cmCPackGenerator.h"
#include "cmCPackTGZGenerator.h"
#include "cmTypeMacro.h"
#include <iosfwd>
/** \class cmCPackSTGZGenerator
* \brief A generator for Self extractable TGZ files

View File

@ -12,6 +12,9 @@
#include "cmCPackTGZGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPackTGZGenerator::cmCPackTGZGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressGZip, "paxr")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPackTGZGenerator_h
#define cmCPackTGZGenerator_h
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTGZGenerator
* \brief A generator for TGZ files

View File

@ -12,6 +12,9 @@
#include "cmCPackTXZGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPackTXZGenerator::cmCPackTXZGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPackTXZGenerator_h
#define cmCPackTXZGenerator_h
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTXZGenerator
* \brief A generator for TXZ files

View File

@ -12,6 +12,9 @@
#include "cmCPackTarBZip2Generator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPackTarBZip2Generator::cmCPackTarBZip2Generator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressBZip2, "paxr")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPackTarBZip2Generator_h
#define cmCPackTarBZip2Generator_h
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTarBZip2Generator
* \brief A generator for TarBZip2 files

View File

@ -12,6 +12,9 @@
#include "cmCPackTarCompressGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPackTarCompressGenerator::cmCPackTarCompressGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressCompress, "paxr")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPackTarCompressGenerator_h
#define cmCPackTarCompressGenerator_h
#include "cmCPackTGZGenerator.h"
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackTarCompressGenerator
* \brief A generator for TarCompress files

View File

@ -12,6 +12,9 @@
#include "cmCPackZIPGenerator.h"
#include "cmArchiveWrite.h"
#include "cmCPackArchiveGenerator.h"
cmCPackZIPGenerator::cmCPackZIPGenerator()
: cmCPackArchiveGenerator(cmArchiveWrite::CompressNone, "zip")
{

View File

@ -13,7 +13,11 @@
#ifndef cmCPackZIPGenerator_h
#define cmCPackZIPGenerator_h
#include <cmConfigure.h>
#include "cmCPackArchiveGenerator.h"
#include "cmCPackGenerator.h"
#include "cmTypeMacro.h"
/** \class cmCPackZIPGenerator
* \brief A generator for ZIP files

View File

@ -9,22 +9,30 @@
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#include "cmSystemTools.h"
#include <cmConfigure.h>
// Need these for documentation support.
#include "cmCPackGenerator.h"
#include "cmCPackGeneratorFactory.h"
#include "cmCPackLog.h"
#include "cmDocumentation.h"
#include "cmDocumentationEntry.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTypeMacro.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
#include "cmake.h"
#include "cmCPackLog.h"
#include <cmsys/CommandLineArguments.hxx>
#include <cmsys/Encoding.hxx>
#include <cmsys/SystemTools.hxx>
#include <iostream>
#include <map>
#include <sstream>
#include <stddef.h>
#include <string>
#include <utility>
#include <vector>
static const char* cmDocumentationName[][2] = {
{ CM_NULLPTR, " cpack - Packaging driver provided by CMake." },