[SCons] Fix Cantera.mak when blas_lapack_dir is empty
Previously, if no library directory needed to be specified for BLAS/LAPACK, the link line would end up containing '-L -llapack -lblas' which is interpreted as adding the directory '-llapack' to the linker search path.
This commit is contained in:
parent
05198ddcfb
commit
31c66378c6
2 changed files with 7 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ CANTERA_SUNDIALS_LIBS=@mak_sundials_libdir@ @mak_sundials_libs@
|
|||
# BLAS LAPACK LINKAGE
|
||||
###############################################################################
|
||||
|
||||
CANTERA_BLAS_LAPACK_LIBS=-L@blas_lapack_dir@ @mak_blas_lapack_libs@
|
||||
CANTERA_BLAS_LAPACK_LIBS=@mak_blas_lapack_libs@
|
||||
|
||||
###############################################################################
|
||||
# COMBINATIONS OF INCLUDES AND LIBS
|
||||
|
|
|
|||
|
|
@ -65,7 +65,12 @@ else:
|
|||
localenv['mak_boost_include'] = ''
|
||||
|
||||
# Handle BLAS/LAPACK linkage
|
||||
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])
|
||||
blas_lapack_libs = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])
|
||||
if localenv['blas_lapack_dir']:
|
||||
localenv['mak_blas_lapack_libs'] = '-L{} {}'.format(localenv['blas_lapack_dir'],
|
||||
blas_lapack_libs)
|
||||
else:
|
||||
localenv['mak_blas_lapack_libs'] = blas_lapack_libs
|
||||
|
||||
if 'Accelerate' in localenv['FRAMEWORKS']:
|
||||
localenv['mak_blas_lapack_libs'] += ' -framework Accelerate'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue