1if(NOT MD5)
2  message(FATAL_ERROR "MD5 not specified")
3endif()
4
5if(NOT FILE)
6  message(FATAL_ERROR "FILE not specified")
7endif()
8
9file(MD5 ${FILE} MD5FILE)
10
11if(NOT MD5 STREQUAL MD5FILE)
12	message(FATAL_ERROR "MD5 of ${FILE} should be ${MD5}, not ${MD5FILE}.")
13else()
14	message(STATUS "${MD5}: OK")
15endif()
16