summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2021-09-18 14:13:47 -0700
committerGitHub <noreply@github.com>2021-09-18 15:13:47 -0600
commit8f3482b2ce28ed863bfd470384bd116b583101c5 (patch)
tree72c9828288d3566ae3a3d125c56a357590302466
parentfc79a5da17d612398598a46e140b3643af0bef59 (diff)
downloadspack-8f3482b2ce28ed863bfd470384bd116b583101c5.tar.gz
spack-8f3482b2ce28ed863bfd470384bd116b583101c5.tar.bz2
spack-8f3482b2ce28ed863bfd470384bd116b583101c5.tar.xz
spack-8f3482b2ce28ed863bfd470384bd116b583101c5.zip
FFTW: Fix OpenMP Build on macOS (#26039)
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 5325545984..845e714bc7 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -86,6 +86,17 @@ class FftwBase(AutotoolsPackage):
"""Precisions that have been selected in this build"""
return self.spec.variants['precision'].value
+ def setup_build_environment(self, env):
+ if self.spec.satisfies('%apple-clang +openmp'):
+ env.append_flags(
+ 'CPPFLAGS', self.compiler.openmp_flag)
+ env.append_flags(
+ 'CFLAGS', self.spec['llvm-openmp'].headers.include_flags)
+ env.append_flags(
+ 'CXXFLAGS', self.spec['llvm-openmp'].headers.include_flags)
+ env.append_flags(
+ 'LDFLAGS', self.spec['llvm-openmp'].libs.ld_flags)
+
def configure(self, spec, prefix):
# Base options
options = [