diff options
Diffstat (limited to 'cmakescripts')
-rw-r--r-- | cmakescripts/md5cmp.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmakescripts/md5cmp.cmake b/cmakescripts/md5cmp.cmake new file mode 100644 index 0000000..c315aa8 --- /dev/null +++ b/cmakescripts/md5cmp.cmake @@ -0,0 +1,15 @@ +if(NOT MD5) + message(FATAL_ERROR "MD5 not specified") +endif() + +if(NOT FILE) + message(FATAL_ERROR "FILE not specified") +endif() + +file(MD5 ${FILE} MD5FILE) + +if(NOT MD5 STREQUAL MD5FILE) + message(FATAL_ERROR "MD5 of ${FILE} should be ${MD5}, not ${MD5FILE}.") +else() + message(STATUS "${MD5}: OK") +endif() |