mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
cmCPackArchiveGenerator: support setting archive options
This commit is contained in:
@@ -154,6 +154,13 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
|
|||||||
} \
|
} \
|
||||||
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
|
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
|
||||||
do { \
|
do { \
|
||||||
|
if (!this->SetArchiveOptions(&archive)) { \
|
||||||
|
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
||||||
|
"Problem to set archive options <" \
|
||||||
|
<< (filename) << ">, ERROR = " << (archive).GetError() \
|
||||||
|
<< std::endl); \
|
||||||
|
return 0; \
|
||||||
|
} \
|
||||||
if (!archive.Open()) { \
|
if (!archive.Open()) { \
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
||||||
"Problem to open archive <" \
|
"Problem to open archive <" \
|
||||||
@@ -335,3 +342,8 @@ bool cmCPackArchiveGenerator::SupportsComponentInstallation() const
|
|||||||
// (for backward compatibility reason)
|
// (for backward compatibility reason)
|
||||||
return IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL");
|
return IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmCPackArchiveGenerator::SetArchiveOptions(cmArchiveWrite* /*archive*/)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -86,6 +86,8 @@ private:
|
|||||||
return this->OutputExtension.c_str();
|
return this->OutputExtension.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SetArchiveOptions(cmArchiveWrite* archive);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmArchiveWrite::Compress Compress;
|
cmArchiveWrite::Compress Compress;
|
||||||
std::string ArchiveFormat;
|
std::string ArchiveFormat;
|
||||||
|
Reference in New Issue
Block a user