From: Joel Rosdahl Date: Sat, 27 Apr 2024 08:30:18 +0000 (+0200) Subject: build: Improve handling of dependencies (#1429) X-Git-Tag: v4.10~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46ab182eb72c44a654c9fcbf8d17b934f9271d4c;p=thirdparty%2Fccache.git build: Improve handling of dependencies (#1429) - Introduced a new CMake variable called `DEPS` with the following semantics: - `AUTO` (the default): Use dependencies from the local system if available. Otherwise: Use bundled dependencies if available. Otherwise: Download dependencies from the internet (dependencies will then be linked statically). - `DOWNLOAD`: Use bundled dependencies if available. Otherwise: Download recommended versions from the internet (dependencies will then be linked statically). - `LOCAL`: Use dependencies from the local system if available. Otherwise: Use bundled dependencies if available. The old `HIREDIS_FROM_INTERNET`, `ZSTD_FROM_INTERNET` and `OFFLINE` variables have been removed in favor of `DEPS`. - Streamlined the CMake code for hiredis and zstd. - Removed bundled `getopt_long` implementation. It seems likely that getopt_long is available on all platforms where ccache is built nowadays, except Windows. Therefore, remove the bundled getopt_long implementation for now. If it turns out that somebody wants to compile ccache on a system that lacks getopt_long we can add support specifying a system or downloaded version. - Implemented our own AVX2 runtime detection instead of using a blake3's ditto. This opens up for using blake3 from the system. - Added support for using blake3, httplib, nonstd/span and tl/expected from the system instead of bundled versions. - Removed bundled doctest, fmt and xxhash dependencies. Instead, download them if missing. Closes #1396. Closes #1424. --- 46ab182eb72c44a654c9fcbf8d17b934f9271d4c diff --cc .github/workflows/build.yaml index 498297a71,08ff09b42..3dff8d534 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@@ -381,19 -398,9 +398,19 @@@ jobs CC: cl CXX: cl CMAKE_GENERATOR: Visual Studio 17 2022 - CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=CI -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON -A x64 + CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=CI -A x64 TEST_CC: clang -target x86_64-pc-windows-msvc + # Doesn't run tests as windows machines are x86 + - name: Windows VS2022 ARM64 MSBuild + os: windows-2022 + msvc_arch: ARM64 + CC: cl + CXX: cl + CMAKE_GENERATOR: Visual Studio 17 2022 + CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=CI -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON -DENABLE_TESTING=OFF -A ARM64 + RUN_TESTS: none + - name: Clang address & UB sanitizer os: ubuntu-20.04 CC: clang