mfem: have hypre link line also link lapack+blas (#7165)

Spack's hypre package depends on LAPACK and BLAS, so linking to hypre
requires linking to the LAPACK and BLAS libraries used to build hypre.
This commit is contained in:
Geoffrey Oxberry 2018-02-15 05:59:07 -08:00 committed by Massimiliano Culpo
parent 87043679ae
commit 1810fac25f

View file

@ -180,10 +180,13 @@ def yes_no(varstr):
options += ['MPICXX=%s' % spec['mpi'].mpicxx]
if '+hypre' in spec:
options += [
'HYPRE_DIR=%s' % spec['hypre'].prefix,
'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include,
'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + ' -lHYPRE']
hypre = spec['hypre']
hypre_flag_list = (hypre.libs +
hypre['lapack'].libs +
hypre['blas'].libs)
options += ['HYPRE_DIR=%s' % hypre.prefix,
'HYPRE_OPT=-I%s' % hypre.prefix.include,
'HYPRE_LIB=%s' % hypre_flag_list.ld_flags]
if '+lapack' in spec:
lapack_lib = (spec['lapack'].libs + spec['blas'].libs).ld_flags # NOQA: ignore=E501