FFTW: Fix OpenMP Build on macOS (#26039)

This commit is contained in:
Axel Huebl 2021-09-18 14:13:47 -07:00 committed by GitHub
parent fc79a5da17
commit 8f3482b2ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,17 @@ def selected_precisions(self):
"""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 = [