Made linking to Sundials libraries more consistent
This commit is contained in:
parent
b3be325ade
commit
70cdd1be3e
4 changed files with 9 additions and 5 deletions
|
|
@ -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'])
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue