diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-04-04 17:41:02 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-03-31 15:08:32 (GMT) |
commit | b71d385ed466363c64af82fb0bffd5f4fdc4b1c3 (patch) | |
tree | edf031155f4d527398987c600e4592d10d1157f4 /Source/CPack | |
parent | 948aa8bd1cee99479bde13704467a50872d7ff93 (diff) | |
download | CMake-b71d385ed466363c64af82fb0bffd5f4fdc4b1c3.zip CMake-b71d385ed466363c64af82fb0bffd5f4fdc4b1c3.tar.gz CMake-b71d385ed466363c64af82fb0bffd5f4fdc4b1c3.tar.bz2 |
cmCPackArchiveGenerator: support setting archive options
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index f0a6965..d5654da 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -154,6 +154,13 @@ int cmCPackArchiveGenerator::addOneComponentToArchive( } \ cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \ 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()) { \ cmCPackLogger(cmCPackLog::LOG_ERROR, \ "Problem to open archive <" \ @@ -335,3 +342,8 @@ bool cmCPackArchiveGenerator::SupportsComponentInstallation() const // (for backward compatibility reason) return IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL"); } + +bool cmCPackArchiveGenerator::SetArchiveOptions(cmArchiveWrite* /*archive*/) +{ + return true; +} diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index 8d67720..7eb5665 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -86,6 +86,8 @@ private: return this->OutputExtension.c_str(); } + bool SetArchiveOptions(cmArchiveWrite* archive); + private: cmArchiveWrite::Compress Compress; std::string ArchiveFormat; |