mapnik/tests/cpp_tests/build.py

22 lines
597 B
Python
Raw Normal View History

import os
import glob
2011-08-12 23:31:28 +02:00
from copy import copy
Import ('env')
2011-08-12 23:31:28 +02:00
test_env = env.Clone()
headers = env['CPPPATH']
2011-08-12 23:31:28 +02:00
libraries = copy(env['LIBMAPNIK_LIBS'])
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','-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)