diff options
author | Brad King <brad.king@kitware.com> | 2011-11-16 01:32:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-11-16 15:15:44 (GMT) |
commit | 38771d3bdf51b81d46578e0c81ebddbdea0ce3b2 (patch) | |
tree | cb83e9ed3b723144b427a5acf083fdc384953761 /Tests/CMakeTests | |
parent | 73efd4a5044d2346e14d019197e2ddced3f9b7a8 (diff) | |
download | CMake-38771d3bdf51b81d46578e0c81ebddbdea0ce3b2.zip CMake-38771d3bdf51b81d46578e0c81ebddbdea0ce3b2.tar.gz CMake-38771d3bdf51b81d46578e0c81ebddbdea0ce3b2.tar.bz2 |
Add file(SHA*) commands to compute cryptographic hashes
Add a file() command API for SHA1, SHA224, SHA256, SHA384, and SHA512.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r-- | Tests/CMakeTests/File-SHA1-Works.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/File-SHA224-Works.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/File-SHA256-Works.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/File-SHA384-Works.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/File-SHA512-Works.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeTests/FileTest.cmake.in | 15 |
6 files changed, 25 insertions, 0 deletions
diff --git a/Tests/CMakeTests/File-SHA1-Works.cmake b/Tests/CMakeTests/File-SHA1-Works.cmake new file mode 100644 index 0000000..03ea3ac --- /dev/null +++ b/Tests/CMakeTests/File-SHA1-Works.cmake @@ -0,0 +1,2 @@ +file(SHA1 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha1) +message("${sha1}") diff --git a/Tests/CMakeTests/File-SHA224-Works.cmake b/Tests/CMakeTests/File-SHA224-Works.cmake new file mode 100644 index 0000000..0295346 --- /dev/null +++ b/Tests/CMakeTests/File-SHA224-Works.cmake @@ -0,0 +1,2 @@ +file(SHA224 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha224) +message("${sha224}") diff --git a/Tests/CMakeTests/File-SHA256-Works.cmake b/Tests/CMakeTests/File-SHA256-Works.cmake new file mode 100644 index 0000000..32bc9fe --- /dev/null +++ b/Tests/CMakeTests/File-SHA256-Works.cmake @@ -0,0 +1,2 @@ +file(SHA256 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha256) +message("${sha256}") diff --git a/Tests/CMakeTests/File-SHA384-Works.cmake b/Tests/CMakeTests/File-SHA384-Works.cmake new file mode 100644 index 0000000..5c56de2 --- /dev/null +++ b/Tests/CMakeTests/File-SHA384-Works.cmake @@ -0,0 +1,2 @@ +file(SHA384 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha384) +message("${sha384}") diff --git a/Tests/CMakeTests/File-SHA512-Works.cmake b/Tests/CMakeTests/File-SHA512-Works.cmake new file mode 100644 index 0000000..cf10706 --- /dev/null +++ b/Tests/CMakeTests/File-SHA512-Works.cmake @@ -0,0 +1,2 @@ +file(SHA512 ${CMAKE_CURRENT_LIST_DIR}/File-Copy-NoDest.cmake sha512) +message("${sha512}") diff --git a/Tests/CMakeTests/FileTest.cmake.in b/Tests/CMakeTests/FileTest.cmake.in index 3aa88a7..824aba7 100644 --- a/Tests/CMakeTests/FileTest.cmake.in +++ b/Tests/CMakeTests/FileTest.cmake.in @@ -22,6 +22,16 @@ set(MD5-BadArg4-RESULT 1) set(MD5-BadArg4-STDERR "file MD5 requires a file name and output variable") set(MD5-Works-RESULT 0) set(MD5-Works-STDERR "a28a44fb5b58a6acf0cbec46557bc775") +set(SHA1-Works-RESULT 0) +set(SHA1-Works-STDERR "e0ce452a7e34e9c705b46e4e7c9cd959082c0777") +set(SHA224-Works-RESULT 0) +set(SHA224-Works-STDERR "d1f1c9db3df73586a5a200014505ef03b70da5e0539eb35c11b4ef6f") +set(SHA256-Works-RESULT 0) +set(SHA256-Works-STDERR "bb38de1c34713f750a4f84404ef5fb1efb93cf815cb09182db457ba91de19195") +set(SHA384-Works-RESULT 0) +set(SHA384-Works-STDERR "2f01d58436bd04a40ec2c938a15f2bb661bf1bf1560a5f2d40a3ebbb716a58e400ab2992c23ba19fa96dc519e0042c26") +set(SHA512-Works-RESULT 0) +set(SHA512-Works-STDERR "349d02e347ddb133afb4557c9e541163f54b6eaa9eb345672bfd7bbce90c9872bf1fad9c6662248eb7b092aef719e4b8c3b8bb1cf47f287abbde12360c073686") include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") check_cmake_test(File @@ -37,6 +47,11 @@ check_cmake_test(File MD5-BadArg2 MD5-BadArg4 MD5-Works + SHA1-Works + SHA224-Works + SHA256-Works + SHA384-Works + SHA512-Works ) # Also execute each test listed in FileTestScript.cmake: |