CPack: Add support for CPACK_ARCHIVE_ZSTD_COMPRESSION_LEVEL
file(ARCHIVE)
supports setting the compression level, but CPACK does not. It seems reasonably easy to add, although it takes a little more than my simple approach to only add it for zstd:
else if (this->Compress == cmArchiveWrite::CompressZstd) {
if (this->IsSet("CPACK_ARCHIVE_ZSTD_COMPRESSION_LEVEL")) {
const char* compression_level = this->GetOption("CPACK_ARCHIVE_ZSTD_COMPRESSION_LEVEL");
archive->SetFilterOption("zstd", "compression-level", compression_level);
}
}
after this line: https://gitlab.kitware.com/cmake/cmake/-/blob/v3.20.1/Source/CPack/cmCPackArchiveGenerator.cxx#L367
Would there be interest in a patch that does this?