pexsi: add openmp flags to fortran flags if dependencies use OpenMP (#19274)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Tom Payerle 2020-10-15 09:41:58 -04:00 committed by GitHub
parent a9dfa89c89
commit 9a554769a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,14 +62,15 @@ def edit(self, spec, prefix):
('@STDCXX_LIB', ' '.join(self.compiler.stdcxx_libs))
]
fldflags = ''
if '@0.9.2' in self.spec:
substitutions.append(
('@FLDFLAGS', '-Wl,--allow-multiple-definition')
)
else:
substitutions.append(
('@FLDFLAGS', '')
)
fldflags += ' -Wl,--allow-multiple-definition'
if ('^superlu +openmp' in self.spec
or '^openblas threads=openmp' in self.spec):
fldflags += ' ' + self.compiler.openmp_flag
substitutions.append(('@FLDFLAGS', fldflags.lstrip()))
template = join_path(
os.path.dirname(inspect.getmodule(self).__file__),