COMP: Fix build problems
This commit is contained in:
parent
8b0c04724c
commit
bf044cec81
|
@ -271,13 +271,6 @@ const char* cmCPackGenericGenerator::GetOption(const char* op)
|
|||
return m_MakefileMap->GetDefinition(op);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int cmCPackGenericGenerator::GenerateHeader(std::ostream* os)
|
||||
{
|
||||
(void)os;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int cmCPackGenericGenerator::FindRunningCMake(const char* arg0)
|
||||
{
|
||||
|
|
|
@ -70,7 +70,6 @@ public:
|
|||
protected:
|
||||
int PrepareNames();
|
||||
int InstallProject();
|
||||
virtual int GenerateHeader(std::ostream* os);
|
||||
|
||||
virtual const char* GetOutputExtension() { return "cpack"; }
|
||||
virtual const char* GetOutputPostfix() { return 0; }
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
class cmCPackTGZGeneratorForward
|
||||
{
|
||||
public:
|
||||
static int GenerateHeader(cmCPackTGZGenerator* gg, std::ostream* os)
|
||||
{
|
||||
return gg->GenerateHeader(os);
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
cmCPackTGZGenerator::cmCPackTGZGenerator()
|
||||
{
|
||||
|
@ -64,8 +74,15 @@ public:
|
|||
cmCPackTGZGenerator* Generator;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
int cmCPackTGZ_Data_Open(void *client_data, const char* name, int oflags, mode_t mode);
|
||||
ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n);
|
||||
int cmCPackTGZ_Data_Close(void *client_data);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int cmCPackTGZGenerator::TGZ_Open(void *client_data, const char* pathname, int, mode_t)
|
||||
int cmCPackTGZ_Data_Open(void *client_data, const char* pathname, int, mode_t)
|
||||
{
|
||||
cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data;
|
||||
|
||||
|
@ -79,7 +96,7 @@ int cmCPackTGZGenerator::TGZ_Open(void *client_data, const char* pathname, int,
|
|||
gf->SetCompression(true);
|
||||
gf->SetCompressionExtraExtension(false);
|
||||
|
||||
if ( !mydata->Generator->GenerateHeader(mydata->OutputStream))
|
||||
if ( !cmCPackTGZGeneratorForward::GenerateHeader(mydata->Generator,mydata->OutputStream))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -87,7 +104,7 @@ int cmCPackTGZGenerator::TGZ_Open(void *client_data, const char* pathname, int,
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
ssize_t cmCPackTGZGenerator::TGZ_Write(void *client_data, void *buff, size_t n)
|
||||
ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n)
|
||||
{
|
||||
cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data;
|
||||
|
||||
|
@ -100,7 +117,7 @@ ssize_t cmCPackTGZGenerator::TGZ_Write(void *client_data, void *buff, size_t n)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int cmCPackTGZGenerator::TGZ_Close(void *client_data)
|
||||
int cmCPackTGZ_Data_Close(void *client_data)
|
||||
{
|
||||
cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data;
|
||||
|
||||
|
@ -120,10 +137,10 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName, const char* topl
|
|||
char pathname[TAR_MAXPATHLEN];
|
||||
|
||||
tartype_t gztype = {
|
||||
(openfunc_t)cmCPackTGZGenerator::TGZ_Open,
|
||||
(closefunc_t)cmCPackTGZGenerator::TGZ_Close,
|
||||
(openfunc_t)cmCPackTGZ_Data_Open,
|
||||
(closefunc_t)cmCPackTGZ_Data_Close,
|
||||
(readfunc_t)0,
|
||||
(writefunc_t)cmCPackTGZGenerator::TGZ_Write,
|
||||
(writefunc_t)cmCPackTGZ_Data_Write,
|
||||
&mydata
|
||||
};
|
||||
|
||||
|
@ -173,3 +190,12 @@ int cmCPackTGZGenerator::CompressFiles(const char* outFileName, const char* topl
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int cmCPackTGZGenerator::GenerateHeader(std::ostream* os)
|
||||
{
|
||||
(void)os;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
#ifndef cmCPackTGZGenerator_h
|
||||
#define cmCPackTGZGenerator_h
|
||||
|
||||
|
||||
#include "cmCPackGenericGenerator.h"
|
||||
#include "CPack/cmCPackConfigure.h" // for ssize_t
|
||||
|
||||
class cmCPackTGZGeneratorForward;
|
||||
|
||||
/** \class cmCPackTGZGenerator
|
||||
* \brief A generator for TGZ files
|
||||
|
@ -30,6 +30,7 @@
|
|||
class cmCPackTGZGenerator : public cmCPackGenericGenerator
|
||||
{
|
||||
public:
|
||||
friend class cmCPackTGZGeneratorForward;
|
||||
cmCPackTypeMacro(cmCPackTGZGenerator, cmCPackGenericGenerator);
|
||||
|
||||
/**
|
||||
|
@ -50,10 +51,7 @@ public:
|
|||
virtual ~cmCPackTGZGenerator();
|
||||
|
||||
protected:
|
||||
static int TGZ_Open(void *client_data, const char* name, int oflags, mode_t mode);
|
||||
static ssize_t TGZ_Write(void *client_data, void *buff, size_t n);
|
||||
static int TGZ_Close(void *client_data);
|
||||
|
||||
virtual int GenerateHeader(std::ostream* os);
|
||||
int CompressFiles(const char* outFileName, const char* toplevel,
|
||||
const std::vector<std::string>& files);
|
||||
virtual const char* GetOutputExtension() { return "tar.gz"; }
|
||||
|
|
Loading…
Reference in New Issue