From 5ffd3d035dfd3d7f6e66edbaa895b98792ba3de3 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 19 Feb 2023 21:11:27 +0100 Subject: build: build all dependencies in parallel (#22329) Previously, all targets were connected in one main target called third-party in order to remove any potentially conflicting shared library. We can make each dependency target independent of each other by only removing shared libraries from luajit and msgpack in their own targets, as only these has unwanted shared libraries. --- cmake.deps/cmake/GetBinaryDeps.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index da4376998b..d1406350dd 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -35,5 +35,4 @@ function(GetBinaryDep) BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/bin COMMAND "${_gettool_INSTALL_COMMAND}") - list(APPEND THIRD_PARTY_DEPS ${__gettool_TARGET}) endfunction() -- cgit From 0007aa50bd3d54259bb4ae717c114f5524ec59fa Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:30:07 +0100 Subject: build: unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON This will reduce required boilerplate, but more importantly it will automatically unset variables ending on URL. This will help people needing to avoid to unset the URL variable each time a new dependency is added. It is possible that this may remove a non-download variable ending on "URL" in the future, however, the risk of this is likely much lower than the risk of someone forgetting to unset the variable. --- cmake.deps/cmake/GetBinaryDeps.cmake | 3 --- 1 file changed, 3 deletions(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index d1406350dd..a90a076e33 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -22,9 +22,6 @@ function(GetBinaryDep) message(FATAL_ERROR "${URL_VARNAME} and ${HASH_VARNAME} must be set") endif() - if(USE_EXISTING_SRC_DIR) - unset(URL) - endif() ExternalProject_Add(${_gettool_TARGET} URL ${URL} URL_HASH SHA256=${HASH} -- cgit From f4d83ac1e22e55a12895e5945680d90ee7c09b85 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 5 Mar 2023 15:21:46 +0100 Subject: build: consistently use the provided option paths We provide options such as "DEPS_BIN_DIR" for the user to set, but only sometimes use them. This makes binaries and other files to be spread out if the user defines a custom DEPS_BIN_DIR location. --- cmake.deps/cmake/GetBinaryDeps.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index a90a076e33..bac7dff919 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -30,6 +30,6 @@ function(GetBinaryDep) CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/bin + INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR} COMMAND "${_gettool_INSTALL_COMMAND}") endfunction() -- cgit From 81abd5c5c7ad0d05adecba66dd1b8fc7b238201a Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 23 Mar 2023 08:37:00 +0100 Subject: build: download wintools executables separately The wintools executables are stored in a zip file, making it inconvenient to bump these during releases. Instead, unpack the executables in the deps repository and download each executable separately. --- cmake.deps/cmake/GetBinaryDeps.cmake | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index bac7dff919..48e66363d3 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -10,17 +10,10 @@ function(GetBinaryDep) "INSTALL_COMMAND" ${ARGN}) - if(NOT _gettool_TARGET OR NOT _gettool_INSTALL_COMMAND) - message(FATAL_ERROR "Must pass INSTALL_COMMAND and TARGET") - endif() - string(TOUPPER "${_gettool_TARGET}_URL" URL_VARNAME) string(TOUPPER "${_gettool_TARGET}_SHA256" HASH_VARNAME) set(URL ${${URL_VARNAME}}) set(HASH ${${HASH_VARNAME}}) - if(NOT URL OR NOT HASH ) - message(FATAL_ERROR "${URL_VARNAME} and ${HASH_VARNAME} must be set") - endif() ExternalProject_Add(${_gettool_TARGET} URL ${URL} @@ -33,3 +26,28 @@ function(GetBinaryDep) INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR} COMMAND "${_gettool_INSTALL_COMMAND}") endfunction() + +# Download executable and move it to DEPS_BIN_DIR +function(GetExecutable) + cmake_parse_arguments(ARG + "" + "TARGET" + "" + ${ARGN}) + + string(TOUPPER "${ARG_TARGET}_URL" URL_VARNAME) + string(TOUPPER "${ARG_TARGET}_SHA256" HASH_VARNAME) + set(URL ${${URL_VARNAME}}) + set(HASH ${${HASH_VARNAME}}) + + ExternalProject_Add(${ARG_TARGET} + URL ${URL} + URL_HASH SHA256=${HASH} + DOWNLOAD_NO_PROGRESS TRUE + DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR} + DOWNLOAD_NO_EXTRACT TRUE + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BIN_DIR}) +endfunction() -- cgit From c8667c8756a211b8597e2e0a80200498b752915d Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 15 Apr 2023 22:39:30 +0200 Subject: build: various cmake fixes - Remove unused function argument from GetBinaryDeps - Remove unused variable LUA_LOAD_PACKAGE_MODULE_SOURCE - Add LUA_FS_MODULE_SOURCE as a dependency of VIM_MODULE_FILE --- cmake.deps/cmake/GetBinaryDeps.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index 48e66363d3..a98f0f5062 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -5,7 +5,7 @@ # install root. function(GetBinaryDep) cmake_parse_arguments(_gettool - "BUILD_IN_SOURCE" + "" "TARGET" "INSTALL_COMMAND" ${ARGN}) -- cgit From 99b8a343e197cdec53f752e1cce01ae25eb45c12 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 20 Nov 2023 12:42:54 +0100 Subject: fixup: quick update, squash later --- cmake.deps/cmake/GetBinaryDeps.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index a98f0f5062..2f1e237588 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -18,13 +18,13 @@ function(GetBinaryDep) ExternalProject_Add(${_gettool_TARGET} URL ${URL} URL_HASH SHA256=${HASH} - DOWNLOAD_NO_PROGRESS TRUE DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR} CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR} - COMMAND "${_gettool_INSTALL_COMMAND}") + COMMAND "${_gettool_INSTALL_COMMAND}" + ${EXTERNALPROJECT_OPTIONS}) endfunction() # Download executable and move it to DEPS_BIN_DIR @@ -43,11 +43,11 @@ function(GetExecutable) ExternalProject_Add(${ARG_TARGET} URL ${URL} URL_HASH SHA256=${HASH} - DOWNLOAD_NO_PROGRESS TRUE DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR} DOWNLOAD_NO_EXTRACT TRUE CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR} - COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BIN_DIR}) + COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BIN_DIR} + ${EXTERNALPROJECT_OPTIONS}) endfunction() -- cgit