From 43ca89bf18b70cafa01377529fcbf6b87efd200c Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Thu, 11 Jul 2024 00:14:26 +0800 Subject: [PATCH] Avoid OpenCL functionality on MacOS builds Unfortunately even the simplest clGetDeviceIds function doesn't work correctly anymore on macOS (at least in GHA), and even simple tools like clinfo fail to query the list of devices in the platform. Let's therefore simply turn OpenCL support off in macOS builds. Signed-off-by: Rodrigo Tobar --- .github/workflows/build-and-test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 7ca63f0..e97988a 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -53,11 +53,13 @@ jobs: - name: Configure env: LIBPROFIT_NO_OPENMP: ${{ matrix.omp && 'OFF' || 'ON' }} + LIBPROFIT_NO_OPENCL: ${{ matrix.os == 'macos-latest' && 'ON' || 'OFF' }} LIBPROFIT_USE_R: ${{ matrix.use_r && 'ON' || 'OFF' }} CMAKE_EXTRA_FLAGS: ${{ matrix.poor_build && '-DLIBPROFIT_NO_OPENCL=ON -DLIBPROFIT_NO_OPENMP=ON -DLIBPROFIT_NO_FFTW=ON -DLIBPROFIT_NO_SIMD=ON' || '' }} run: | cmake -B ${CI_BUILD_DIR} -G Ninja \ -DLIBPROFIT_NO_OPENMP=$LIBPROFIT_NO_OPENMP \ + -DLIBPROFIT_NO_OPENMP=$LIBPROFIT_NO_OPENCL \ -DLIBPROFIT_TEST=ON \ -DLIBPROFIT_USE_R=$LIBPROFIT_USE_R \ -DCMAKE_CXX_COMPILER=$CXX \