diff options
author | Asher Mancinelli <ashermancinelli@gmail.com> | 2022-04-29 12:46:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 12:46:43 -0600 |
commit | 6df71118fb2de024e51d9b7b1e9aa3da05375702 (patch) | |
tree | 2208465cc83c93253e96bd0bd165452032ab57ff /var | |
parent | ed7812b8bed62cd2fc92fa6577549574f33a3706 (diff) | |
download | spack-6df71118fb2de024e51d9b7b1e9aa3da05375702.tar.gz spack-6df71118fb2de024e51d9b7b1e9aa3da05375702.tar.bz2 spack-6df71118fb2de024e51d9b7b1e9aa3da05375702.tar.xz spack-6df71118fb2de024e51d9b7b1e9aa3da05375702.zip |
Pass blas flags to hsl lflags when ^coinhsl+blas (#30309)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ipopt/package.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py index a0881cef05..8f33d85916 100644 --- a/var/spack/repos/builtin/packages/ipopt/package.py +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -109,14 +109,19 @@ class Ipopt(AutotoolsPackage): "--with-mumps-cflags=%s" % mumps_dir.include]) if 'coinhsl' in spec: + hsl_ld_flags = '-ldl {0}'.format(spec['coinhsl'].libs.ld_flags) + + if spec.satisfies('^coinhsl+blas'): + hsl_ld_flags += ' {0}'.format(spec['blas'].libs.ld_flags) + if spec.satisfies('@:3.12.13'): args.extend([ - '--with-hsl-lib=%s' % spec['coinhsl'].libs.ld_flags, + '--with-hsl-lib=%s' % hsl_ld_flags, '--with-hsl-incdir=%s' % spec['coinhsl'].prefix.include]) else: args.extend([ "--with-hsl", - "--with-hsl-lflags=%s" % spec['coinhsl'].libs.ld_flags, + "--with-hsl-lflags=%s" % hsl_ld_flags, "--with-hsl-cflags=%s" % spec['coinhsl'].prefix.include]) if 'metis' in spec: |