💚 fix Ubuntu build

pull/3876/head
Niels Lohmann 2022-12-10 22:01:08 +01:00
parent 07182ebc1d
commit b6dcf3edf3
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 12 additions and 22 deletions

View File

@ -90,7 +90,7 @@ jobs:
target: [ci_cmake_flags, ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls] target: [ci_cmake_flags, ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
steps: steps:
- name: Install build-essential - name: Install build-essential
run: apt-get update ; apt-get install -y build-essential unzip clang wget lib32z1 run: apt-get update ; apt-get install -y build-essential unzip clang wget
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Get latest CMake and ninja - name: Get latest CMake and ninja
uses: lukka/get-cmake@latest uses: lukka/get-cmake@latest

View File

@ -836,27 +836,17 @@ add_custom_target(ci_benchmarks
############################################################################### ###############################################################################
function(ci_get_cmake version var) function(ci_get_cmake version var)
if (APPLE) set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}/bin/cmake)
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}-Darwin64/CMake.app/Contents/bin/cmake) add_custom_command(
add_custom_command( OUTPUT ${${var}}
OUTPUT ${${var}} COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}.tar.gz
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-Darwin64.tar.gz COMMAND tar xfz cmake-${version}.tar.gz
COMMAND tar xfz cmake-${version}-Darwin64.tar.gz COMMAND rm cmake-${version}.tar.gz
COMMAND rm cmake-${version}-Darwin64.tar.gz COMMAND ${CMAKE_COMMAND} -S cmake-${version} -B cmake-${version}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} --build cmake-${version} --parallel 10
COMMENT "Download CMake ${version}" WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
) COMMENT "Download CMake ${version}"
else() )
set(${var} ${PROJECT_BINARY_DIR}/cmake-${version}-Linux-x86_64/bin/cmake)
add_custom_command(
OUTPUT ${${var}}
COMMAND wget -nc https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-Linux-x86_64.tar.gz
COMMAND tar xfz cmake-${version}-Linux-x86_64.tar.gz
COMMAND rm cmake-${version}-Linux-x86_64.tar.gz
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Download CMake ${version}"
)
endif()
set(${var} ${${var}} PARENT_SCOPE) set(${var} ${${var}} PARENT_SCOPE)
endfunction() endfunction()