diff options
Diffstat (limited to 'Tests/RunCMake/File_Archive')
19 files changed, 31 insertions, 18 deletions
diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt b/Tests/RunCMake/File_Archive/7zip-with-bad-compression-result.txt index d00491fd7e..d00491fd7e 100644 --- a/Tests/RunCMake/File_Archive/zip-with-bad-type-result.txt +++ b/Tests/RunCMake/File_Archive/7zip-with-bad-compression-result.txt diff --git a/Tests/RunCMake/File_Archive/7zip-with-bad-compression-stderr.txt b/Tests/RunCMake/File_Archive/7zip-with-bad-compression-stderr.txt new file mode 100644 index 0000000000..f6bd1ab14f --- /dev/null +++ b/Tests/RunCMake/File_Archive/7zip-with-bad-compression-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at roundtrip.cmake:38 \(file\): + file archive format 7zip does not support COMPRESSION arguments +Call Stack \(most recent call first\): + 7zip-with-bad-compression.cmake:6 \(include\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/File_Archive/7zip-with-bad-compression.cmake b/Tests/RunCMake/File_Archive/7zip-with-bad-compression.cmake new file mode 100644 index 0000000000..7461eb8b2a --- /dev/null +++ b/Tests/RunCMake/File_Archive/7zip-with-bad-compression.cmake @@ -0,0 +1,6 @@ +set(OUTPUT_NAME "test.zip") + +set(ARCHIVE_FORMAT 7zip) +set(COMPRESSION_TYPE XZ) + +include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/7zip.cmake b/Tests/RunCMake/File_Archive/7zip.cmake index 7b0b9b7f1d..530e940d00 100644 --- a/Tests/RunCMake/File_Archive/7zip.cmake +++ b/Tests/RunCMake/File_Archive/7zip.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.7z") -set(COMPRESSION_FORMAT 7zip) +set(ARCHIVE_FORMAT 7zip) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/RunCMakeTest.cmake b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake index 871cb6dba8..2bd0cd892c 100644 --- a/Tests/RunCMake/File_Archive/RunCMakeTest.cmake +++ b/Tests/RunCMake/File_Archive/RunCMakeTest.cmake @@ -14,4 +14,5 @@ run_cmake(zip) run_cmake(zip-filtered) run_cmake(unsupported-format) -run_cmake(zip-with-bad-type) +run_cmake(zip-with-bad-compression) +run_cmake(7zip-with-bad-compression) diff --git a/Tests/RunCMake/File_Archive/gnutar-gz.cmake b/Tests/RunCMake/File_Archive/gnutar-gz.cmake index f4e397556a..829022b0e9 100644 --- a/Tests/RunCMake/File_Archive/gnutar-gz.cmake +++ b/Tests/RunCMake/File_Archive/gnutar-gz.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar.gz") -set(COMPRESSION_FORMAT gnutar) +set(ARCHIVE_FORMAT gnutar) set(COMPRESSION_TYPE GZip) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/gnutar.cmake b/Tests/RunCMake/File_Archive/gnutar.cmake index e5cbd356cf..17425c73f1 100644 --- a/Tests/RunCMake/File_Archive/gnutar.cmake +++ b/Tests/RunCMake/File_Archive/gnutar.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar") -set(COMPRESSION_FORMAT gnutar) +set(ARCHIVE_FORMAT gnutar) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/pax-xz.cmake b/Tests/RunCMake/File_Archive/pax-xz.cmake index 47fb0fd76d..ae485fd208 100644 --- a/Tests/RunCMake/File_Archive/pax-xz.cmake +++ b/Tests/RunCMake/File_Archive/pax-xz.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar.xz") -set(COMPRESSION_FORMAT pax) +set(ARCHIVE_FORMAT pax) set(COMPRESSION_TYPE XZ) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/pax-zstd.cmake b/Tests/RunCMake/File_Archive/pax-zstd.cmake index 59e04430d4..ba3036ead9 100644 --- a/Tests/RunCMake/File_Archive/pax-zstd.cmake +++ b/Tests/RunCMake/File_Archive/pax-zstd.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar.zstd") -set(COMPRESSION_FORMAT pax) +set(ARCHIVE_FORMAT pax) set(COMPRESSION_TYPE Zstd) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/pax.cmake b/Tests/RunCMake/File_Archive/pax.cmake index e50c74fe2d..46002fbbdf 100644 --- a/Tests/RunCMake/File_Archive/pax.cmake +++ b/Tests/RunCMake/File_Archive/pax.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar") -set(COMPRESSION_FORMAT pax) +set(ARCHIVE_FORMAT pax) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/paxr-bz2.cmake b/Tests/RunCMake/File_Archive/paxr-bz2.cmake index 469a13158a..d38f8f3c9c 100644 --- a/Tests/RunCMake/File_Archive/paxr-bz2.cmake +++ b/Tests/RunCMake/File_Archive/paxr-bz2.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar.bz2") -set(COMPRESSION_FORMAT paxr) +set(ARCHIVE_FORMAT paxr) set(COMPRESSION_TYPE BZip2) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/paxr.cmake b/Tests/RunCMake/File_Archive/paxr.cmake index e3a4d5cf7a..ce44f05898 100644 --- a/Tests/RunCMake/File_Archive/paxr.cmake +++ b/Tests/RunCMake/File_Archive/paxr.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.tar") -set(COMPRESSION_FORMAT paxr) +set(ARCHIVE_FORMAT paxr) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/roundtrip.cmake b/Tests/RunCMake/File_Archive/roundtrip.cmake index 9050400a6f..f1b0de5063 100644 --- a/Tests/RunCMake/File_Archive/roundtrip.cmake +++ b/Tests/RunCMake/File_Archive/roundtrip.cmake @@ -1,4 +1,4 @@ -foreach(parameter OUTPUT_NAME COMPRESSION_FORMAT) +foreach(parameter OUTPUT_NAME ARCHIVE_FORMAT) if(NOT DEFINED ${parameter}) message(FATAL_ERROR "missing required parameter ${parameter}") endif() @@ -37,8 +37,8 @@ file(MAKE_DIRECTORY ${FULL_DECOMPRESS_DIR}) file(ARCHIVE_CREATE OUTPUT ${FULL_OUTPUT_NAME} - FORMAT "${COMPRESSION_FORMAT}" - TYPE "${COMPRESSION_TYPE}" + FORMAT "${ARCHIVE_FORMAT}" + COMPRESSION "${COMPRESSION_TYPE}" VERBOSE DIRECTORY ${COMPRESS_DIR}) diff --git a/Tests/RunCMake/File_Archive/unsupported-format.cmake b/Tests/RunCMake/File_Archive/unsupported-format.cmake index 61edc1bb46..4b41e65f6e 100644 --- a/Tests/RunCMake/File_Archive/unsupported-format.cmake +++ b/Tests/RunCMake/File_Archive/unsupported-format.cmake @@ -1,5 +1,5 @@ set(OUTPUT_NAME "test.rar") -set(COMPRESSION_FORMAT rar) +set(ARCHIVE_FORMAT rar) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/zip-filtered.cmake b/Tests/RunCMake/File_Archive/zip-filtered.cmake index 2d259bc413..e6bdcce58c 100644 --- a/Tests/RunCMake/File_Archive/zip-filtered.cmake +++ b/Tests/RunCMake/File_Archive/zip-filtered.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.zip") -set(COMPRESSION_FORMAT zip) +set(ARCHIVE_FORMAT zip) set(DECOMPRESSION_OPTIONS FILES diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-compression-result.txt b/Tests/RunCMake/File_Archive/zip-with-bad-compression-result.txt new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/Tests/RunCMake/File_Archive/zip-with-bad-compression-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt b/Tests/RunCMake/File_Archive/zip-with-bad-compression-stderr.txt index fe12febafe..72ad8c44e6 100644 --- a/Tests/RunCMake/File_Archive/zip-with-bad-type-stderr.txt +++ b/Tests/RunCMake/File_Archive/zip-with-bad-compression-stderr.txt @@ -1,5 +1,5 @@ CMake Error at roundtrip.cmake:38 \(file\): - file archive format zip does not support TYPE arguments + file archive format zip does not support COMPRESSION arguments Call Stack \(most recent call first\): - zip-with-bad-type.cmake:6 \(include\) + zip-with-bad-compression.cmake:6 \(include\) CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/File_Archive/zip-with-bad-type.cmake b/Tests/RunCMake/File_Archive/zip-with-bad-compression.cmake index ebb97a389e..2badd5bcc3 100644 --- a/Tests/RunCMake/File_Archive/zip-with-bad-type.cmake +++ b/Tests/RunCMake/File_Archive/zip-with-bad-compression.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.zip") -set(COMPRESSION_FORMAT zip) +set(ARCHIVE_FORMAT zip) set(COMPRESSION_TYPE BZip2) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) diff --git a/Tests/RunCMake/File_Archive/zip.cmake b/Tests/RunCMake/File_Archive/zip.cmake index 1b93058b60..09e84b08c9 100644 --- a/Tests/RunCMake/File_Archive/zip.cmake +++ b/Tests/RunCMake/File_Archive/zip.cmake @@ -1,6 +1,6 @@ set(OUTPUT_NAME "test.zip") -set(COMPRESSION_FORMAT zip) +set(ARCHIVE_FORMAT zip) include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) |