2013-01-09 03:07:11 +00:00
|
|
|
import os
|
|
|
|
import glob
|
|
|
|
from copy import copy
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
|
|
|
|
test_env = env.Clone()
|
|
|
|
|
2014-06-10 18:58:58 +00:00
|
|
|
test_env['LIBS'] = [env['MAPNIK_NAME']]
|
|
|
|
test_env.AppendUnique(LIBS=copy(env['LIBMAPNIK_LIBS']))
|
2015-01-28 21:16:55 +00:00
|
|
|
if env['PLATFORM'] == 'Linux':
|
2014-06-10 18:58:58 +00:00
|
|
|
test_env.AppendUnique(LIBS='dl')
|
2014-06-10 19:01:35 +00:00
|
|
|
test_env.AppendUnique(LIBS='rt')
|
2013-01-09 03:07:11 +00:00
|
|
|
test_env.AppendUnique(CXXFLAGS='-g')
|
2014-06-10 18:58:58 +00:00
|
|
|
test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS'])
|
|
|
|
test_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES'])
|
|
|
|
if test_env['HAS_CAIRO']:
|
|
|
|
test_env.PrependUnique(CPPPATH=test_env['CAIRO_CPPPATHS'])
|
|
|
|
test_env.Append(CPPDEFINES = '-DHAVE_CAIRO')
|
2015-01-28 21:16:55 +00:00
|
|
|
test_env['LINKFLAGS'] = copy(test_env['LIBMAPNIK_LINKFLAGS'])
|
2013-02-27 22:48:51 +00:00
|
|
|
if env['PLATFORM'] == 'Darwin':
|
2014-05-17 02:00:37 +00:00
|
|
|
test_env.Append(LINKFLAGS='-F/ -framework CoreFoundation')
|
2013-01-09 03:07:11 +00:00
|
|
|
|
2014-05-17 02:00:37 +00:00
|
|
|
test_env_local = test_env.Clone()
|
|
|
|
|
|
|
|
for cpp_test in glob.glob('*cpp'):
|
|
|
|
test_program = test_env_local.Program('out/'+cpp_test.replace('.cpp',''), source=[cpp_test])
|
2013-01-09 03:07:11 +00:00
|
|
|
if 'install' in COMMAND_LINE_TARGETS:
|
|
|
|
env.Alias('install',test_program)
|
2014-05-17 02:00:37 +00:00
|
|
|
#Depends(test_program, env.subst('../src/%s' % env['MAPNIK_LIB_NAME']))
|