build: introduce variable DEPS_IGNORE_SHA for skipping dependency hash check

This will reduce friction as developers no longer need to provide a hash
when testing out different commits.

To skip the hash check, set `DEPS_IGNORE_SHA` to `TRUE` in
`cmake.deps/CMakeLists.txt`.
This commit is contained in:
dundargoc
2024-03-18 13:29:24 +01:00
committed by dundargoc
parent d744876723
commit 187ae67735
14 changed files with 68 additions and 43 deletions

View File

@ -54,3 +54,11 @@ if(CMAKE_OSX_ARCHITECTURES)
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -arch ${ARCH}")
endforeach()
endif()
function(get_sha name ignore)
unset(EXTERNALPROJECT_URL_HASH)
if(NOT ${ignore})
string(TOUPPER ${name} name_allcaps)
set(EXTERNALPROJECT_URL_HASH URL_HASH SHA256=${${name_allcaps}_SHA256} PARENT_SCOPE)
endif()
endfunction()