Skip to content

Allow ExternalProject_Add URL_HASH ..hash.. to be quoted

Isaiah requested to merge ihnorton/cmake:fix_ep_urlhash_quoted into master

People, understandably, tend to quote variable expansions out of habit when using CMake. Unfortunately, doing so when passing a URL_HASH to EP_Add breaks the consistency check. Such a usage snuck in to a release version of ITK:

because the hash was switched from URL_MD5 (which does var substitution first) to URL_HASH (which checks the whole argument to URL_HASH)

Which in turn breaks the build 🤘

ATTENTION: You have enabled the use of FFTW. This library is distributed under a GPL license. By enabling this option, the ITK libraries binary that is built will be covered by a GPL license and so will any executable that is linked against these libraries.
CMake Error at /_build_env/share/cmake-3.13/Modules/ExternalProject.cmake:2430 (message):
  URL_HASH is set to

    SHA512="1ee2c7bec3657f6846e63c6dfa71410563830d2b951966bf0123bd8f4f2f5d6b50f13b76d9a7b0eae70e44856f829ca6ceb3d080bb01649d1572c9f3f68e8eb1"

  but must be ALGO=value where ALGO is

    MD5|SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512

  and value is a hex string.
Call Stack (most recent call first):
  /_build_env/share/cmake-3.13/Modules/ExternalProject.cmake:3105 (_ep_add_download_command)
  CMake/itkExternal_FFTW.cmake:90 (ExternalProject_add)
  CMakeLists.txt:321 (include)
Edited by Isaiah

Merge request reports