Skip to content

Commit

Permalink
[SCons] Fix BLAS/LAPACK-related variables in Cantera.mak
Browse files Browse the repository at this point in the history
* Fix logic for when BLAS/LAPACK libraries need to be explicitly listed
* ctlapack and ctblas are no longer separate libraries
  • Loading branch information
speth committed Jun 22, 2015
1 parent 4efad93 commit eb75e8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
12 changes: 1 addition & 11 deletions platform/posix/Cantera.mak.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ CANTERA_SUNDIALS_LIBS=@mak_sundials_libdir@ @mak_sundials_libs@
# BLAS LAPACK LINKAGE
###############################################################################

CANTERA_have_blas_lapack_dir=@mak_have_blas_lapack_dir@

ifeq ($(CANTERA_have_blas_lapack_dir), 1)
CANTERA_BLAS_LAPACK_LIBS=@blas_lapack_dir@ @mak_blas_lapack_libs@
CANTERA_BLAS_LAPACK_LIBS_DEP= @mak_blas_lapack_libs_dep@
else
CANTERA_BLAS_LAPACK_LIBS=@mak_blas_lapack_libs@
CANTERA_BLAS_LAPACK_LIBS_DEP=$(CANTERA_INSTALL_DIR)/lib/libctlapack.a $(CANTERA_INSTALL_DIR)/lib/libctblas.a
endif

###############################################################################
# COMBINATIONS OF INCLUDES AND LIBS
Expand All @@ -94,9 +86,7 @@ CANTERA_LIBS=$(CANTERA_CORE_LIBS) \
CANTERA_TOTAL_LIBS=$(CANTERA_LIBS)

CANTERA_TOTAL_LIBS_DEP= $(CANTERA_CORE_LIBS_DEP) \
$(CANTERA_SUNDIALS_LIBS_DEP) \
$(CANTERA_BLAS_LAPACK_LIBS_DEP)

$(CANTERA_SUNDIALS_LIBS_DEP)

CANTERA_FORTRAN_LIBS=$(CANTERA_CORE_FTN) \
$(CANTERA_EXTRA_LIBDIRS) $(CANTERA_SUNDIALS_LIBS) \
Expand Down
9 changes: 1 addition & 8 deletions platform/posix/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ localenv['mak_boost_libs'] = ' '.join('-l%s' % s for s in localenv['boost_libs']
pc_libs += localenv['boost_libs']

# Handle BLAS/LAPACK linkage
localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else '0'

if localenv['blas_lapack_dir']:
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])
localenv['mak_blas_lapack_libs_dep'] = ''
else:
localenv['mak_blas_lapack_libs'] = ''
localenv['mak_blas_lapack_libs_dep'] = ''
localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs'])

if 'Accelerate' in localenv['FRAMEWORKS']:
localenv['mak_blas_lapack_libs'] += ' -framework Accelerate'
Expand Down

0 comments on commit eb75e8b

Please sign in to comment.