2013-01-09 04:07:11 +01:00
|
|
|
import os
|
|
|
|
import glob
|
|
|
|
from copy import copy
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
|
|
|
|
test_env = env.Clone()
|
|
|
|
|
|
|
|
test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS'])
|
|
|
|
test_env.AppendUnique(LIBS='mapnik')
|
|
|
|
#test_env.AppendUnique(LIBS='sqlite3')
|
|
|
|
test_env.AppendUnique(CXXFLAGS='-g')
|
2013-02-27 23:48:51 +01:00
|
|
|
linkflags = copy(env['CUSTOM_LDFLAGS'])
|
|
|
|
linkflags
|
|
|
|
if env['PLATFORM'] == 'Darwin':
|
|
|
|
linkflags += ' -F/ -framework CoreFoundation'
|
2013-01-09 04:07:11 +01:00
|
|
|
|
|
|
|
for cpp_test in glob.glob('run*.cpp'):
|
|
|
|
name = cpp_test.replace('.cpp','')
|
|
|
|
source_files = [cpp_test]
|
|
|
|
test_env_local = test_env.Clone()
|
2013-02-27 23:48:51 +01:00
|
|
|
test_program = test_env_local.Program(name, source=source_files, LINKFLAGS=linkflags)
|
2013-01-09 04:07:11 +01:00
|
|
|
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)
|