diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-06-30 11:43:37 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2020-06-30 12:01:35 (GMT) |
commit | bbcff21f716f25649d744553b9085c8e6c0c1a35 (patch) | |
tree | 9a1fe2b2e9a34ad7756beaf03ddc53b58782f602 /Tests/RunCMake | |
parent | e23428c99f146699dbcc724c45837cd61bc13ae7 (diff) | |
download | CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.zip CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.tar.gz CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.tar.bz2 |
file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS
to more accurately describe the way the options are used.
Fixes: #20884
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/File_Archive/roundtrip.cmake | 24 | ||||
-rw-r--r-- | Tests/RunCMake/File_Archive/zip-filtered.cmake | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Tests/RunCMake/File_Archive/roundtrip.cmake b/Tests/RunCMake/File_Archive/roundtrip.cmake index f1b0de5..0638367 100644 --- a/Tests/RunCMake/File_Archive/roundtrip.cmake +++ b/Tests/RunCMake/File_Archive/roundtrip.cmake @@ -36,17 +36,17 @@ file(REMOVE_RECURSE ${FULL_DECOMPRESS_DIR}) file(MAKE_DIRECTORY ${FULL_DECOMPRESS_DIR}) file(ARCHIVE_CREATE - OUTPUT ${FULL_OUTPUT_NAME} - FORMAT "${ARCHIVE_FORMAT}" - COMPRESSION "${COMPRESSION_TYPE}" - VERBOSE - DIRECTORY ${COMPRESS_DIR}) + OUTPUT ${FULL_OUTPUT_NAME} + FORMAT "${ARCHIVE_FORMAT}" + COMPRESSION "${COMPRESSION_TYPE}" + VERBOSE + PATHS ${COMPRESS_DIR}) file(ARCHIVE_EXTRACT - INPUT ${FULL_OUTPUT_NAME} - ${DECOMPRESSION_OPTIONS} - DESTINATION ${FULL_DECOMPRESS_DIR} - VERBOSE) + INPUT ${FULL_OUTPUT_NAME} + ${DECOMPRESSION_OPTIONS} + DESTINATION ${FULL_DECOMPRESS_DIR} + VERBOSE) if(CUSTOM_CHECK_FILES) set(CHECK_FILES ${CUSTOM_CHECK_FILES}) @@ -57,11 +57,11 @@ foreach(file ${CHECK_FILES}) set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file}) if(NOT EXISTS ${input}) - message(SEND_ERROR "Cannot find input file ${output}") + message(SEND_ERROR "Cannot find input file ${output}") endif() if(NOT EXISTS ${output}) - message(SEND_ERROR "Cannot find output file ${output}") + message(SEND_ERROR "Cannot find output file ${output}") endif() file(MD5 ${input} input_md5) @@ -76,7 +76,7 @@ foreach(file ${NOT_EXISTING_FILES_CHECK}) set(output ${FULL_DECOMPRESS_DIR}/${COMPRESS_DIR}/${file}) if(EXISTS ${output}) - message(SEND_ERROR "File ${output} exists but it shouldn't") + message(SEND_ERROR "File ${output} exists but it shouldn't") endif() endforeach() diff --git a/Tests/RunCMake/File_Archive/zip-filtered.cmake b/Tests/RunCMake/File_Archive/zip-filtered.cmake index e6bdcce..a4aab8b 100644 --- a/Tests/RunCMake/File_Archive/zip-filtered.cmake +++ b/Tests/RunCMake/File_Archive/zip-filtered.cmake @@ -3,9 +3,9 @@ set(OUTPUT_NAME "test.zip") set(ARCHIVE_FORMAT zip) set(DECOMPRESSION_OPTIONS - FILES + PATTERNS compress_dir/f1.txt # Decompress only file - compress_dir/d1 # and whole directory + compress_*/d? # and whole directory (has only one match) ) set(CUSTOM_CHECK_FILES |