build: allow SKIP or skip to be used as the SHA1

This will skip hash checking, just like the all zeros hash.
This commit is contained in:
John Szakmeister 2015-02-09 06:26:59 -05:00
parent 2019380bfa
commit aa45a2c6cf

View File

@ -77,6 +77,12 @@ endif()
set(NULL_SHA1 "0000000000000000000000000000000000000000") set(NULL_SHA1 "0000000000000000000000000000000000000000")
# Allow users to use "SKIP" or "skip" as the sha1 to skip checking the hash.
# You can still use the all zeros hash too.
if((EXPECTED_SHA1 STREQUAL "SKIP") OR (EXPECTED_SHA1 STREQUAL "skip"))
set(EXPECTED_SHA1 ${NULL_SHA1})
endif()
# We could avoid computing the SHA1 entirely if a NULL_SHA1 was given, # We could avoid computing the SHA1 entirely if a NULL_SHA1 was given,
# but we want to warn users of an empty file. # but we want to warn users of an empty file.
file(SHA1 ${file} ACTUAL_SHA1) file(SHA1 ${file} ACTUAL_SHA1)