suite-sparse ^openblas~shared threads=openmp: add -fopenmp (#36521)

* suite-sparse ^openblas~shared threads=openmp: add -fopenmp to cflags, cxxflags

* use compiler.openmp_flag
This commit is contained in:
eugeneswalker 2023-04-04 10:52:34 -05:00 committed by GitHub
parent 78f5b2a2c6
commit 1a2510d031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,6 +95,12 @@ class SuiteSparse(Package):
"%gcc@:4.8", when="@5.2.0:", msg="gcc version must be at least 4.9 for suite-sparse@5.2.0:"
)
def flag_handler(self, name, flags):
if name in ("cflags", "cxxflags"):
if self.spec.satisfies("^openblas ~shared threads=openmp"):
flags.append(self.compiler.openmp_flag)
return (flags, None, None)
def symbol_suffix_blas(self, spec, args):
"""When using BLAS with a special symbol suffix we use defines to
replace blas symbols, e.g. dgemm_ becomes dgemm_64_ when