diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-07-28 14:23:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-28 14:23:35 (GMT) |
commit | 22bfe014d0a2676f46523b3e0cd334dba154f77a (patch) | |
tree | b02240ea37123cd493db477f7a51b7569984d521 /Tests/RunCMake | |
parent | 261a2585d9df7113a5ba7c9beacb641754444523 (diff) | |
parent | fed7d8f76de3442f4aede00f8e47c3d142f73e94 (diff) | |
download | CMake-22bfe014d0a2676f46523b3e0cd334dba154f77a.zip CMake-22bfe014d0a2676f46523b3e0cd334dba154f77a.tar.gz CMake-22bfe014d0a2676f46523b3e0cd334dba154f77a.tar.bz2 |
Merge topic 'file-download-no-save'
fed7d8f76d file(DOWNLOAD): Make file argument optional
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5060
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt | 0 | ||||
-rw-r--r-- | Tests/RunCMake/file/RunCMakeTest.cmake | 1 |
5 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt new file mode 100644 index 0000000..b0f0d19 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at DOWNLOAD-no-save-hash\.cmake:[0-9]+ \(file\): + file DOWNLOAD cannot calculate hash if file is not saved\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake new file mode 100644 index 0000000..ce959a7 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.cmake @@ -0,0 +1,8 @@ +if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/") + set(slash /) +endif() +file(DOWNLOAD + "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-no-save-md5.txt" + EXPECTED_HASH MD5=55555555555555555555555555555555 + STATUS status + ) diff --git a/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/DOWNLOAD-no-save-hash.txt diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index a4de1d3..8d84943 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -11,6 +11,7 @@ run_cmake(DOWNLOAD-netrc-bad) run_cmake(DOWNLOAD-tls-cainfo-not-set) run_cmake(DOWNLOAD-tls-verify-not-set) run_cmake(DOWNLOAD-pass-not-set) +run_cmake(DOWNLOAD-no-save-hash) run_cmake(TOUCH) run_cmake(TOUCH-error-in-source-directory) run_cmake(TOUCH-error-missing-directory) |