compile c++ tests even if only installing and hook them all up automatically to make test target

This commit is contained in:
Dane Springmeyer 2012-04-04 15:19:37 -07:00
parent 3e3bdf6607
commit a50ea0750e
2 changed files with 6 additions and 4 deletions

View file

@ -18,9 +18,8 @@ uninstall:
python scons/scons.py uninstall
test:
@python tests/visual_tests/test.py
@tests/cpp_tests/font_registration_test
@tests/cpp_tests/params_test
@python tests/visual_tests/test.py -q
@tests/cpp_tests/*-bin
@python tests/run_tests.py -q
pep8:

View file

@ -14,5 +14,8 @@ libraries.append('mapnik')
test_env.Append(CXXFLAGS='-g')
for cpp_test in glob.glob('*_test.cpp'):
test_program = test_env.Program(cpp_test.replace('.cpp',''), [cpp_test], CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
test_program = test_env.Program(cpp_test.replace('.cpp','-bin'), [cpp_test], CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
Depends(test_program, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
# build locally if installing
if 'install' in COMMAND_LINE_TARGETS:
env.Alias('install',test_program)