From f22ecac5c4c9e8d6150f6ae926119f77d92490f4 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 15 Mar 2012 22:49:04 +0000 Subject: [PATCH] Use the Accelerate framework for BLAS and LAPACK on OS X --- SConstruct | 11 +++++++---- src/matlab/SConscript | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 5f15b468e..65df4c519 100644 --- a/SConstruct +++ b/SConstruct @@ -797,13 +797,16 @@ if env.get('python_array') in ('numarray', 'numeric'): # ********************************************** # *** Set additional configuration variables *** # ********************************************** -if env['blas_lapack_libs'] == '': +if env['blas_lapack_libs'] != '': + env['blas_lapack_libs'] = env['blas_lapack_libs'].split(',') + env['BUILD_BLAS_LAPACK'] = False +elif env['OS'] == 'Darwin': + env['BUILD_BLAS_LAPACK'] = False + env.Append(FRAMEWORKS=['Accelerate']) +else: # External BLAS/LAPACK were not given, so we need to compile them env['BUILD_BLAS_LAPACK'] = True env['blas_lapack_libs'] = [] # built into libcantera -else: - env['blas_lapack_libs'] = env['blas_lapack_libs'].split(',') - env['BUILD_BLAS_LAPACK'] = False # Directories where things will be after actually being installed # These variables are the ones that are used to populate header files, diff --git a/src/matlab/SConscript b/src/matlab/SConscript index e7fd3f281..dbbf214bc 100644 --- a/src/matlab/SConscript +++ b/src/matlab/SConscript @@ -30,7 +30,6 @@ elif localenv['OS'] == 'Darwin': linklibs += ['mx', 'mex', 'mat'] + env['LIBM'] mexPlatform = 'maci' linkflags.extend(['-Wl,-exported_symbol,_mexFunction']) - localenv.Append(FRAMEWORKS=['Accelerate']) if localenv['OS_BITS'] == 64: matlab_libs = pjoin(localenv['matlab_path'], 'bin', 'maci64')