diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88d2a99029..7bfff05564 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -319,9 +319,8 @@ check from cmake. Alternatively, you may point the URL as a local path where the repository is. This is convenient when bisecting a problem in a dependency with `git bisect`. -This requires running `make distclean` the first time once to remove traces of -the previous build. Hash checking is always skipped in this case regardless of -`DEPS_IGNORE_SHA`. +This may require running `make distclean` between each build. Hash checking is +always skipped in this case regardless of `DEPS_IGNORE_SHA`. ```bash LUAJIT_URL /home/user/luajit diff --git a/cmake/Deps.cmake b/cmake/Deps.cmake index 7a098415d7..214e015d1c 100644 --- a/cmake/Deps.cmake +++ b/cmake/Deps.cmake @@ -51,19 +51,12 @@ function(get_externalproject_options name DEPS_IGNORE_SHA) string(TOUPPER ${name} name_allcaps) set(url ${${name_allcaps}_URL}) - set(EXTERNALPROJECT_OPTIONS DOWNLOAD_NO_PROGRESS TRUE) + set(EXTERNALPROJECT_OPTIONS + DOWNLOAD_NO_PROGRESS TRUE + EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL}) - if(EXISTS ${url}) - list(APPEND EXTERNALPROJECT_OPTIONS - GIT_REPOSITORY ${${name_allcaps}_URL}) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18) - list(APPEND EXTERNALPROJECT_OPTIONS GIT_REMOTE_UPDATE_STRATEGY CHECKOUT) - endif() - else() - list(APPEND EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL}) - if(NOT ${DEPS_IGNORE_SHA}) - list(APPEND EXTERNALPROJECT_OPTIONS URL_HASH SHA256=${${name_allcaps}_SHA256}) - endif() + if(NOT ${DEPS_IGNORE_SHA}) + list(APPEND EXTERNALPROJECT_OPTIONS URL_HASH SHA256=${${name_allcaps}_SHA256}) endif() set(EXTERNALPROJECT_OPTIONS ${EXTERNALPROJECT_OPTIONS} PARENT_SCOPE)