build: do not use GIT_REPOSITORY for local dependencies

This reverts a large portion of
2c1e8f7e96.

The conclusion from that commit is incorrect: local builds are not
used/updated correctly so much as it's not used at all. Instead the
build will always use `master` branch rather than the current files.
This commit is contained in:
dundargoc 2024-04-24 22:40:10 +02:00 committed by dundargoc
parent 2b9df3f795
commit a1c2da56ec
2 changed files with 7 additions and 15 deletions

View File

@ -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

View File

@ -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)