From 59d5f692f8f563bf6f7c232f971ad764316e4466 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 29 Sep 2022 21:46:14 +0200 Subject: build: rely on builtin cmake downloading rather than custom script DownloadAndExtractFile.cmake was initially introduced as a workaround to avoid the massive amounts of logs generated by the download progress. This is not a problem anymore as ExternalProject_Add has had the DOWNLOAD_NO_PROGRESS option since cmake version 3.1. --- cmake.deps/cmake/GetBinaryDeps.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index 04e3f95a29..f179e36bcf 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -25,15 +25,9 @@ function(GetBinaryDep) ExternalProject_Add(${_gettool_TARGET} PREFIX ${DEPS_BUILD_DIR} URL ${URL} + URL_HASH SHA256=${HASH} + DOWNLOAD_NO_PROGRESS TRUE DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR} - DOWNLOAD_COMMAND ${CMAKE_COMMAND} - -DPREFIX=${DEPS_BUILD_DIR} - -DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR} - -DURL=${URL} - -DEXPECTED_SHA256=${HASH} - -DTARGET=${_gettool_TARGET} - -DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR} - -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 BUILD_COMMAND "" -- cgit From fbc66d798ce834c4ba05360c3c07ce7af40d6fc9 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 1 Oct 2022 14:54:58 +0200 Subject: build: define EP_PREFIX property This is just to avoid the boilerplate of definining PREFIX for each dependency. --- 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 f179e36bcf..3a2e38250a 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -23,7 +23,6 @@ function(GetBinaryDep) endif() ExternalProject_Add(${_gettool_TARGET} - PREFIX ${DEPS_BUILD_DIR} URL ${URL} URL_HASH SHA256=${HASH} DOWNLOAD_NO_PROGRESS TRUE -- cgit From 61da959bb401b83454be0748b7a8b482f1be76e5 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 6 Oct 2022 09:14:38 -0400 Subject: build(deps): restore support for USE_EXISTING_SRC_DIR (#20491) 59d5f692f removed cmake.deps/cmake/DownloadAndExtractFile.cmake and support for USE_EXISTING_SRC_DIR. The Ubuntu nightly PPA still relies on USE_EXISTING_SRC_DIR functionality since it can't access the network during the build. Supplying an empty value for ExternalProject_Add()'s URL value appears to provide the needed mechanism to avoid re-downloading when the sources are already present. This is undocumented behavior, though, so it may break in the future. Now, if USE_EXISTING_SRC_DIR is set, the ExternalProject's URL variable is unset, preventing the download and erroring out if the source doesn't actually exist. --- cmake.deps/cmake/GetBinaryDeps.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmake.deps/cmake/GetBinaryDeps.cmake') diff --git a/cmake.deps/cmake/GetBinaryDeps.cmake b/cmake.deps/cmake/GetBinaryDeps.cmake index 3a2e38250a..da4376998b 100644 --- a/cmake.deps/cmake/GetBinaryDeps.cmake +++ b/cmake.deps/cmake/GetBinaryDeps.cmake @@ -22,6 +22,9 @@ 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