Made linking to Sundials libraries more consistent

This commit is contained in:
Ray Speth 2012-03-01 00:44:50 +00:00
parent b3be325ade
commit 70cdd1be3e
4 changed files with 9 additions and 5 deletions

View file

@ -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'])

View file

@ -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

View file

@ -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:

View file

@ -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'],