From a6ef73f7f2efc996dd7f69e8b59dcc20f584b13a Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Sat, 2 Mar 2024 23:57:24 -0800 Subject: [PATCH] Fix mgard: OpenMP on AppleClang (#42933) macOS AppleClang does not provide OpenMP by default with XCode. Use LLVM's OpenMP to fix compile errors of mgard with OpenMP (default). --- var/spack/repos/builtin/packages/mgard/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/mgard/package.py b/var/spack/repos/builtin/packages/mgard/package.py index 411dd0c9b9..24ac8d25db 100644 --- a/var/spack/repos/builtin/packages/mgard/package.py +++ b/var/spack/repos/builtin/packages/mgard/package.py @@ -53,6 +53,9 @@ class Mgard(CMakePackage, CudaPackage): depends_on("cmake@3.19:", type="build") depends_on("nvcomp@2.2.0:", when="@2022-11-18:+cuda") depends_on("nvcomp@2.0.2", when="@:2021-11-12+cuda") + with when("+openmp"): + depends_on("llvm-openmp", when="%apple-clang") + conflicts("cuda_arch=none", when="+cuda") conflicts( "~cuda", when="@2021-11-12", msg="without cuda MGARD@2021-11-12 has undefined symbols"