From aa45a2c6cf8d2c58b3190d5d190cf06dc0ff8641 Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Mon, 9 Feb 2015 06:26:59 -0500 Subject: [PATCH] build: allow SKIP or skip to be used as the SHA1 This will skip hash checking, just like the all zeros hash. --- third-party/cmake/DownloadAndExtractFile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/third-party/cmake/DownloadAndExtractFile.cmake b/third-party/cmake/DownloadAndExtractFile.cmake index bdf8742af1..875d45795d 100644 --- a/third-party/cmake/DownloadAndExtractFile.cmake +++ b/third-party/cmake/DownloadAndExtractFile.cmake @@ -77,6 +77,12 @@ endif() 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, # but we want to warn users of an empty file. file(SHA1 ${file} ACTUAL_SHA1)