diff --git a/SConstruct b/SConstruct index f0b277312..fd374fa88 100644 --- a/SConstruct +++ b/SConstruct @@ -1007,7 +1007,7 @@ def install(*args, **kwargs): env.SConsignFile() -env.Append(CPPPATH=[], +env.Prepend(CPPPATH=[], LIBPATH=[Dir('build/lib')]) if addInstallActions: diff --git a/ext/SConscript b/ext/SConscript index 7989ef318..f5bd4f088 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -8,13 +8,13 @@ def prep_default(env): def prep_fortran(env): localenv = env.Clone() - localenv.Append(CPPPATH='#include/cantera/base') # for config.h + localenv.Prepend(CPPPATH='#include/cantera/base') # for config.h return localenv def prep_f2c(env): localenv = env.Clone() - localenv.Append(CPPPATH=Dir('#ext/f2c_libs')) + localenv.Prepend(CPPPATH=Dir('#ext/f2c_libs')) if not localenv['HAS_TIMES_H']: localenv.Append(CPPDEFINES=['USE_CLOCK']) if not localenv['HAS_UNISTD_H']: @@ -37,7 +37,7 @@ def prep_f2c(env): def prep_sundials(env): localenv = env.Clone() - localenv.Append(CPPPATH=Dir('#ext/cvode/include')) + localenv.Prepend(CPPPATH=Dir('#ext/cvode/include')) # Suppress warnings from external code if '-Wall' in localenv['CCFLAGS']: @@ -47,8 +47,8 @@ def prep_sundials(env): def prep_gtest(env): localenv = env.Clone() - localenv.Append(CPPPATH=[Dir('#ext/gtest'), - Dir('#ext/gtest/include')], + localenv.Prepend(CPPPATH=[Dir('#ext/gtest'), + Dir('#ext/gtest/include')], CPPDEFINES={'GTEST_HAS_PTHREAD': 0}) return localenv @@ -132,8 +132,8 @@ for subdir, extensions, prepFunction in libs: localenv = env.Clone() -localenv.Append(CPPPATH=[Dir('#ext/gtest'), - Dir('#ext/gtest/include')], +localenv.Prepend(CPPPATH=[Dir('#ext/gtest'), + Dir('#ext/gtest/include')], CPPDEFINES={'GTEST_HAS_PTHREAD': 0}) build(localenv.Library(pjoin('../lib', 'gtest'), source=['gtest/src/gtest-all.cc'])) diff --git a/src/SConscript b/src/SConscript index 3072f5853..496fb0e94 100644 --- a/src/SConscript +++ b/src/SConscript @@ -39,8 +39,8 @@ libs = [('base', ['cpp'], baseSetup), for subdir, extensions, setup in libs: localenv = env.Clone() - localenv.Append(CPPPATH=Dir('#include')) - localenv.Append(CPPPATH=Dir('#src')) # todo: remove when not needed + localenv.Prepend(CPPPATH=Dir('#include')) + localenv.Prepend(CPPPATH=Dir('#src')) # todo: remove when not needed source = setup(localenv, subdir, extensions) objects = localenv.SharedObject(source) localenv.Depends(objects, localenv['config_h_target']) diff --git a/src/apps/SConscript b/src/apps/SConscript index 9b7f3034d..53b013e98 100644 --- a/src/apps/SConscript +++ b/src/apps/SConscript @@ -2,7 +2,7 @@ from buildutils import * Import('env', 'build', 'install') localenv = env.Clone() -localenv.Append(CPPPATH=['#src', '#include', '#src/apps']) +localenv.Prepend(CPPPATH=['#src', '#include', '#src/apps']) def buildProgram(name, src): prog = build(localenv.Program(target=pjoin('#build/bin', name), diff --git a/src/fortran/SConscript b/src/fortran/SConscript index c2c3b91d0..f84cd4757 100644 --- a/src/fortran/SConscript +++ b/src/fortran/SConscript @@ -3,7 +3,7 @@ from buildutils import * Import('env', 'build', 'install') localenv = env.Clone() -localenv.Append(CPPPATH=['#include', '#src']) +localenv.Prepend(CPPPATH=['#include', '#src']) f90_src = mglob(localenv, '.', 'f90', 'cpp') diff --git a/src/matlab/SConscript b/src/matlab/SConscript index 8513e993d..5e7a628ba 100644 --- a/src/matlab/SConscript +++ b/src/matlab/SConscript @@ -53,8 +53,8 @@ elif os.name == 'posix': linkflags.extend(['-Wl,--no-undefined', '-Wl,--version-script,src/matlab/mexFunction.map']) -localenv.Append(CPPPATH=['#include', '#src', matlab_include], - CPPDEFINES=['MATLAB_MEX_FILE'], +localenv.Prepend(CPPPATH=['#include', '#src', matlab_include]) +localenv.Append(CPPDEFINES=['MATLAB_MEX_FILE'], LIBPATH=[matlab_libs], LINKFLAGS=linkflags) diff --git a/src/python/SConscript b/src/python/SConscript index f96f6d47f..9bb4bad3c 100644 --- a/src/python/SConscript +++ b/src/python/SConscript @@ -31,7 +31,7 @@ make_setup = localenv.SubstFile('#interfaces/python/setup.py', extraArgs = '' if localenv['python_package'] == 'full': - localenv.Append(CPPPATH=['#src', '#include']) + localenv.Prepend(CPPPATH=['#src', '#include']) cantera_libname = 'cantera_shared' if os.name=='nt' else 'cantera' #pylinklibs = [cantera_libname, 'cvode', 'ctmath', 'ctlapack', 'ctblas', 'ctf2c', 'execstream'] diff --git a/test/SConscript b/test/SConscript index dbdc0ac6e..c6b4fb8aa 100644 --- a/test/SConscript +++ b/test/SConscript @@ -4,9 +4,9 @@ import subprocess Import('env','build','install') localenv = env.Clone() -localenv.Append(CPPPATH=['#ext/gtest/include', '#include'], - LIBPATH='#build/lib', - LIBS=['gtest'] + localenv['cantera_libs']) +localenv.Prepend(CPPPATH=['#ext/gtest/include', '#include'], + LIBPATH='#build/lib') +localenv.Append(LIBS=['gtest'] + localenv['cantera_libs']) localenv['ENV']['PYTHONPATH'] = Dir('#interfaces/python').abspath localenv['ENV']['CANTERA_DATA'] = Dir('#data/inputs').abspath diff --git a/test_problems/SConscript b/test_problems/SConscript index fe1539f81..2eb081bb7 100644 --- a/test_problems/SConscript +++ b/test_problems/SConscript @@ -2,7 +2,7 @@ from buildutils import * Import('env','build','install') localenv = env.Clone() -localenv.Append(CPPPATH=['#include', '#src', 'shared']) +localenv.Prepend(CPPPATH=['#include', '#src', 'shared']) os.environ['PYTHONPATH'] = pjoin(os.getcwd(), '..', 'interfaces', 'python') os.environ['CANTERA_DATA'] = pjoin(os.getcwd(), '..', 'data', 'inputs')