From 60a00546dca0a219e8016fa85eca7213c526ed92 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 14 Dec 2011 19:34:04 +0000 Subject: [PATCH] Added include directory for f2c code Most f2c code needs the "f2c.h" file, which is only in the ext/f2c_libs directory, but this error doesn't usually show up because it is also in /usr/include on most Unix systems. --- Cantera/src/SConscript | 33 ++++++++++++++++++++------------- ext/SConscript | 1 + 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Cantera/src/SConscript b/Cantera/src/SConscript index e9c4098ae..77232b11f 100644 --- a/Cantera/src/SConscript +++ b/Cantera/src/SConscript @@ -1,22 +1,29 @@ from buildutils import * Import('env','buildTargets','installTargets') -localenv = env.Clone() -# (subdir, library name, (file extensions)) -libs = [('base', 'ctbase', ['cpp']), - ('thermo', 'thermo', ['cpp']), - ('equil', 'equil', ['cpp','c']), - ('converters', 'converters', ['cpp']), - ('numerics', 'ctnumerics', ['cpp']), - ('kinetics', 'kinetics', ['cpp']), - ('transport', 'transport', ['cpp']), - ('spectra', 'ctspectra', ['cpp']), - ('oneD', 'oneD', ['cpp']), - ('zeroD', 'zeroD', ['cpp']), +def empty(env): + pass + +def equilSetup(env): + env.Append(CPPPATH=['#ext/f2c_libs']) + +# (subdir, library name, (file extensions), (extra setup(env))) +libs = [('base', 'ctbase', ['cpp'], empty), + ('thermo', 'thermo', ['cpp'], empty), + ('equil', 'equil', ['cpp','c'], equilSetup), + ('converters', 'converters', ['cpp'], empty), + ('numerics', 'ctnumerics', ['cpp'], empty), + ('kinetics', 'kinetics', ['cpp'], empty), + ('transport', 'transport', ['cpp'], empty), + ('spectra', 'ctspectra', ['cpp'], empty), + ('oneD', 'oneD', ['cpp'], empty), + ('zeroD', 'zeroD', ['cpp'], empty), ] -for subdir, libname, extensions in libs: +for subdir, libname, extensions, setup in libs: + localenv = env.Clone() + setup(localenv) for header in mglob(localenv, subdir, 'h'): h = localenv.Command('../include/cantera/kernel/%s' % header.name, header, Copy('$TARGET', '$SOURCE')) diff --git a/ext/SConscript b/ext/SConscript index 97ef86b9b..9c3d8aec5 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -9,6 +9,7 @@ libs = [('tpx','tpx',['cpp'])] if env['build_with_f2c']: libs.append(('f2c_math', 'ctmath', ['cpp','c'])) + localenv.Append(CPPPATH=Dir('#ext/f2c_libs')) if not localenv['HAS_TIMES_H']: localenv.Append(CPPDEFINES=['USE_CLOCK']) if not localenv['HAS_UNISTD_H']: