aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-04-24 22:40:10 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-04-25 11:17:54 +0200
commita1c2da56ecef9c7a0e17be02f587d7c7f9eee170 (patch)
treeb2979f9533c562841d3c92a1df9797a114996285
parent2b9df3f79541507bfc3ba2645e6b9740e7c922ed (diff)
downloadrneovim-a1c2da56ecef9c7a0e17be02f587d7c7f9eee170.tar.gz
rneovim-a1c2da56ecef9c7a0e17be02f587d7c7f9eee170.tar.bz2
rneovim-a1c2da56ecef9c7a0e17be02f587d7c7f9eee170.zip
build: do not use GIT_REPOSITORY for local dependencies
This reverts a large portion of 2c1e8f7e96926f70151d737ea32f1e6ff3589263. 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.
-rw-r--r--CONTRIBUTING.md5
-rw-r--r--cmake/Deps.cmake17
2 files changed, 7 insertions, 15 deletions
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)