diff options
author | Asit Dhal <dhal.asitk@gmail.com> | 2020-09-17 17:29:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-21 17:08:11 (GMT) |
commit | 195d14e7818244789638fffd2087b8b2d0952622 (patch) | |
tree | 7e46f8f1f6dfbb60dc73bb600e1190369bc00bc0 /Tests/RunCMake/File_Archive/roundtrip.cmake | |
parent | 4fc07cd369cd46fbd859f140eda971d00ac52704 (diff) | |
download | CMake-195d14e7818244789638fffd2087b8b2d0952622.zip CMake-195d14e7818244789638fffd2087b8b2d0952622.tar.gz CMake-195d14e7818244789638fffd2087b8b2d0952622.tar.bz2 |
file(ARCHIVE_CREATE): Add option to control compression level
Fixes: #21125
Diffstat (limited to 'Tests/RunCMake/File_Archive/roundtrip.cmake')
-rw-r--r-- | Tests/RunCMake/File_Archive/roundtrip.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Archive/roundtrip.cmake b/Tests/RunCMake/File_Archive/roundtrip.cmake index 0638367..4049256 100644 --- a/Tests/RunCMake/File_Archive/roundtrip.cmake +++ b/Tests/RunCMake/File_Archive/roundtrip.cmake @@ -90,3 +90,20 @@ function(check_magic EXPECTED) "Actual [${ACTUAL}] does not match expected [${EXPECTED}]") endif() endfunction() + + +function(check_compression_level COMPRESSION_LEVEL) + file(ARCHIVE_CREATE + OUTPUT "${FULL_OUTPUT_NAME}_compression_level" + FORMAT "${ARCHIVE_FORMAT}" + COMPRESSION_LEVEL ${COMPRESSION_LEVEL} + COMPRESSION "${COMPRESSION_TYPE}" + VERBOSE + PATHS ${COMPRESS_DIR}) + + file(ARCHIVE_EXTRACT + INPUT "${FULL_OUTPUT_NAME}_compression_level" + ${DECOMPRESSION_OPTIONS} + DESTINATION ${FULL_DECOMPRESS_DIR} + VERBOSE) +endfunction() |