Removed CANTERA_DATA from config.h

The CANTERA_DATA definition is used only in misc.cpp, so defining it
only when compiling this file reduces the amount of recompilation
required when the definition of CANTERA_DATA is changed.
This commit is contained in:
Ray Speth 2012-01-05 22:22:28 +00:00
parent 3062ddf621
commit b27b0daf0e
3 changed files with 7 additions and 11 deletions

View file

@ -5,6 +5,11 @@ Import('env','buildTargets','installTargets')
def defaultSetup(env, subdir, extensions):
return mglob(env, subdir, *extensions)
def baseSetup(env, subdir, extensions):
escaped_datadir = '\\"' + env['ct_datadir'].replace('\\', '\\\\') + '\\"'
env.Append(CPPDEFINES={'CANTERA_DATA': escaped_datadir})
return defaultSetup(env, subdir, extensions)
def equilSetup(env, subdir, extensions):
env.Append(CPPPATH=['#ext/f2c_libs'])
return defaultSetup(env, subdir, extensions)
@ -18,7 +23,7 @@ def numericsSetup(env, subdir, extensions):
if s.name != remove]
# (subdir, library name, (file extensions), (extra setup(env)))
libs = [('base', 'ctbase', ['cpp'], defaultSetup),
libs = [('base', 'ctbase', ['cpp'], baseSetup),
('thermo', 'thermo', ['cpp'], defaultSetup),
('equil', 'equil', ['cpp','c'], equilSetup),
('converters', 'converters', ['cpp'], defaultSetup),
@ -33,7 +38,7 @@ libs = [('base', 'ctbase', ['cpp'], defaultSetup),
for subdir, libname, extensions, setup in libs:
localenv = env.Clone()
source = setup(localenv, subdir, extensions)
for header in mglob(localenv, subdir, 'h'):
for header in mglob(localenv, subdir, 'h'):
h = localenv.Command('../include/cantera/kernel/%s' % header.name, header,
Copy('$TARGET', '$SOURCE'))
buildTargets.extend(h)

View file

@ -128,13 +128,6 @@ typedef int ftnlen; // Fortran hidden string length type
// present to support conversions
%(HAS_NO_PYTHON)s
//--------------------- Cantera -----------------------------------
// This data pathway is used to locate a directory where datafiles
// are to be found. Note, the local directory is always searched
// as well.
%(CANTERA_DATA)s
%(WITH_HTML_LOGS)s
//--------------------- compile options ----------------------------

View file

@ -760,8 +760,6 @@ cdefine('LAPACK_NAMES_LOWERCASE', 'lapack_names', 'lower')
configh['RXNPATH_FONT'] = quoted(env['rpfont'])
cdefine('THREAD_SAFE_CANTERA', 'build_thread_safe')
cdefine('HAS_SSTREAM', 'HAS_SSTREAM')
escaped_datadir = env['ct_datadir'].replace('\\', '\\\\')
configh['CANTERA_DATA'] = quoted(escaped_datadir)
if not env['HAS_MATH_H_ERF']:
if env['HAS_BOOST_MATH']: