Fixed issues with library and include paths in sample SConstruct scripts
This commit is contained in:
parent
a79428f894
commit
d78ec19e4c
6 changed files with 23 additions and 12 deletions
|
|
@ -35,11 +35,13 @@ for subdir, name, extensions in samples:
|
|||
|
||||
## Generate SConstruct files to be installed
|
||||
incdirs = (localenv['ct_incroot'], localenv['sundials_include'],
|
||||
localenv['boost_inc_dir'])
|
||||
libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir'])
|
||||
localenv['boost_inc_dir']) + tuple(localenv['extra_inc_dirs'])
|
||||
libdirs = ((localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir']) +
|
||||
tuple(localenv['extra_lib_dirs']))
|
||||
linkflags = (debug_link_flag, localenv['thread_flags'])
|
||||
localenv['tmpl_compiler_flags'] = repr(compilerFlags)
|
||||
localenv['tmpl_cantera_frameworks'] = repr(localenv['FRAMEWORKS'])
|
||||
localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x])
|
||||
localenv['tmpl_cantera_libs'] = repr(localenv['cantera_libs'])
|
||||
localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x])
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ env.Append(CCFLAGS=@tmpl_compiler_flags@,
|
|||
CPPPATH=@tmpl_cantera_incdirs@,
|
||||
LIBS=@tmpl_cantera_libs@,
|
||||
LIBPATH=@tmpl_cantera_libdirs@,
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@)
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@,
|
||||
FRAMEWORKS=@tmpl_cantera_frameworks@)
|
||||
|
||||
program = env.Program('@tmpl_progname@', '@tmpl_sourcename@')
|
||||
Default(program)
|
||||
|
|
|
|||
|
|
@ -19,15 +19,18 @@ for program_name, fortran_sources in samples:
|
|||
|
||||
# Generate SConstruct file to be installed
|
||||
incdirs = (localenv['ct_incroot'], localenv['sundials_include'],
|
||||
localenv['boost_inc_dir'])
|
||||
localenv['boost_inc_dir']) + tuple(localenv['extra_inc_dirs'])
|
||||
libs = ['cantera_fortran'] + localenv['cantera_libs'] + ['stdc++']
|
||||
libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir'])
|
||||
libdirs = ((localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir']) +
|
||||
tuple(localenv['extra_lib_dirs']))
|
||||
linkflags = ('-g', localenv['thread_flags'])
|
||||
localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x])
|
||||
localenv['tmpl_cantera_libs'] = repr(libs)
|
||||
localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x])
|
||||
localenv['tmpl_cantera_linkflags'] = repr([x for x in linkflags if x])
|
||||
localenv['tmpl_cantera_frameworks'] = repr(localenv['FRAMEWORKS'])
|
||||
|
||||
sconstruct = localenv.SubstFile('SConstruct', 'SConstruct.in')
|
||||
|
||||
# Generate Makefile to be installed
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ env.Append(FFLAGS='-g',
|
|||
CPPPATH=@tmpl_cantera_incdirs@,
|
||||
LIBS=@tmpl_cantera_libs@,
|
||||
LIBPATH=@tmpl_cantera_libdirs@,
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@)
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@,
|
||||
FRAMEWORKS=@tmpl_cantera_frameworks@)
|
||||
|
||||
ctlib = env.Object('demo_ftnlib.cpp')
|
||||
|
||||
|
|
|
|||
|
|
@ -13,15 +13,18 @@ for programName, sources in samples:
|
|||
LIBPATH=[env['sundials_libdir'], '#build/lib'])
|
||||
|
||||
# Generate SConstruct files to be installed
|
||||
incdirs = [pjoin(localenv['ct_incroot'], 'cantera')]
|
||||
incdirs = [pjoin(localenv['ct_incroot'], 'cantera')] + localenv['extra_inc_dirs']
|
||||
libs = ['cantera_fortran'] + localenv['cantera_libs'] + ['stdc++']
|
||||
libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir'])
|
||||
libdirs = ((localenv['ct_libdir'], localenv['sundials_libdir'],
|
||||
localenv['blas_lapack_dir'], localenv['boost_lib_dir']) +
|
||||
tuple(localenv['extra_lib_dirs']))
|
||||
linkflags = ('-g', localenv['thread_flags'])
|
||||
localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x])
|
||||
localenv['tmpl_cantera_libs'] = repr(libs)
|
||||
localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x])
|
||||
localenv['tmpl_cantera_linkflags'] = repr([x for x in linkflags if x])
|
||||
localenv['tmpl_cantera_frameworks'] = repr(localenv['FRAMEWORKS'])
|
||||
|
||||
localenv['tmpl_progname'] = programName
|
||||
localenv['tmpl_sourcename'] = programName + '.f90'
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ env.Append(FFLAGS='-g',
|
|||
F90PATH=@tmpl_cantera_incdirs@,
|
||||
LIBS=@tmpl_cantera_libs@,
|
||||
LIBPATH=@tmpl_cantera_libdirs@,
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@)
|
||||
LINKFLAGS=@tmpl_cantera_linkflags@,
|
||||
FRAMEWORKS=@tmpl_cantera_frameworks@)
|
||||
|
||||
program = env.Program('@tmpl_progname@', '@tmpl_sourcename@')
|
||||
Default(program)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue