aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-05-11 20:17:15 +0200
committerGitHub <noreply@github.com>2023-05-11 20:17:15 +0200
commit30a0299bc6d1ceedd04d897cf56b298dd3ded0cd (patch)
tree2cc28274024581b3fc9f2ce04bdbf9d11a5a8c52
parente124672ce9a81e0ca32e6c30ea3730ad5fe981af (diff)
downloadrneovim-30a0299bc6d1ceedd04d897cf56b298dd3ded0cd.tar.gz
rneovim-30a0299bc6d1ceedd04d897cf56b298dd3ded0cd.tar.bz2
rneovim-30a0299bc6d1ceedd04d897cf56b298dd3ded0cd.zip
build: make dependency URL variables non-cached (#23577)
Cmake won't rebuild with the new URL when bumping dependency version. This is because the old URL is still cached, and won't be removed automatically. The workaround for using non-cached variables, but also let users specify an alternative URL is to only set the defined variables in deps.txt if the corresponding variable hasn't already been set by the user from the command line. Also apply the CMAKE_CONFIFGURE_DEPENDS property to deps.txt, as we want cmake to rebuild when changing this file.
-rw-r--r--cmake.deps/CMakeLists.txt13
1 files changed, 4 insertions, 9 deletions
diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt
index 3d835064ba..bb86a671f2 100644
--- a/cmake.deps/CMakeLists.txt
+++ b/cmake.deps/CMakeLists.txt
@@ -133,7 +133,9 @@ if(APPLE)
endif()
include(ExternalProject)
-set_directory_properties(PROPERTIES EP_PREFIX "${DEPS_BUILD_DIR}")
+set_directory_properties(PROPERTIES
+ EP_PREFIX "${DEPS_BUILD_DIR}"
+ CMAKE_CONFIGURE_DEPENDS deps.txt)
file(READ deps.txt DEPENDENCIES)
STRING(REGEX REPLACE "\n" ";" DEPENDENCIES "${DEPENDENCIES}")
@@ -141,16 +143,9 @@ foreach(dep ${DEPENDENCIES})
STRING(REGEX REPLACE " " ";" dep "${dep}")
list(GET dep 0 name)
list(GET dep 1 value)
-
- if(name MATCHES "^.*URL$")
- mark_as_advanced(${name})
- if(NOT USE_EXISTING_SRC_DIR)
- set(${name} ${value} CACHE STRING "")
- endif()
- elseif(name MATCHES "^.*SHA256$")
+ if(NOT ${name})
set(${name} ${value})
endif()
-
endforeach()
if(USE_BUNDLED_UNIBILIUM)