diff --git a/SConstruct b/SConstruct index 446b25817..fe8253c1a 100644 --- a/SConstruct +++ b/SConstruct @@ -990,7 +990,10 @@ if env['addInstallTargets']: linkLibs = ['cantera'] if env['use_sundials'] == 'y': - linkLibs.extend(('sundials_cvodes','sundials_nvecserial')) + env['sundials_libs'] = ['sundials_cvodes', 'sundials_ida', 'sundials_nvecserial'] + linkLibs.extend(('sundials_cvodes', 'sundials_ida', 'sundials_nvecserial')) +else: + env['sundials_libs'] = [] linkLibs.extend(env['blas_lapack_libs']) diff --git a/src/SConscript b/src/SConscript index 779a12ced..7a6ce1b03 100644 --- a/src/SConscript +++ b/src/SConscript @@ -60,7 +60,7 @@ if localenv['addInstallTargets']: # OS X requires the shared libraries at link time if localenv['OS'] == 'Darwin' and localenv['use_sundials'] == 'y': - localenv.Append(LIBS=['sundials_cvodes', 'sundials_nvecserial'], + localenv.Append(LIBS=localenv['sundials_libs'], LIBPATH=localenv['sundials_libdir']) # Build the Cantera shared library diff --git a/src/matlab/SConscript b/src/matlab/SConscript index 569de46fd..11ade1feb 100644 --- a/src/matlab/SConscript +++ b/src/matlab/SConscript @@ -33,9 +33,11 @@ localenv = env.Clone() localenv.Append(CPPPATH=['#include', '#src']) cantera_libname = 'cantera_shared' if os.name=='nt' else 'cantera' +libs = [cantera_libname] + env['sundials_libs'] + localenv.Command('build_cantera.m', mglob(localenv, '.', 'cpp'), - MatlabBuilder([cantera_libname])) + MatlabBuilder(libs)) localenv['ENV']['PATH'] = os.environ['PATH'] if 'TEMP' in os.environ: diff --git a/src/python/SConscript b/src/python/SConscript index 14e63a780..8ed9dc79a 100644 --- a/src/python/SConscript +++ b/src/python/SConscript @@ -43,8 +43,7 @@ if localenv['python_package'] == 'full': if localenv['OS'] == 'Darwin': pylinklibs.append('python%s' % gcv('VERSION')) - if localenv['use_sundials'] == 'y': - pylinklibs.extend(['sundials_cvodes', 'sundials_nvecserial']) + pylinklibs.extend(localenv['sundials_libs']) pymodule = localenv.SharedLibrary('#interfaces/python/Cantera/_cantera', ['pycantera.cpp'],