scons: use VariantDir to avoid 'Two environments with different actions' error when building both cpp_tests and with PLUGIN_LINKING=static

This commit is contained in:
Dane Springmeyer 2013-05-17 09:23:10 -07:00
parent ef5e8f7fff
commit 2393453765

View file

@ -35,9 +35,10 @@ for cpp_test in glob.glob('*_test.cpp'):
agg_env['CPPPATH'] = ['#deps/agg/include',env['BOOST_INCLUDES']]
test_program = agg_env.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS'])
else:
VariantDir('build','../../plugins/input/csv/')
test_env_local = test_env.Clone()
if 'csv_parse' in cpp_test:
source_files += glob.glob('../../plugins/input/csv/' + '*.cpp')
source_files += glob.glob('build' + '*.cpp')
test_program = test_env_local.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS'])
Depends(test_program, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
# build locally if installing