2013-01-08 19:07:11 -08:00
|
|
|
import os
|
|
|
|
import glob
|
|
|
|
from copy import copy
|
|
|
|
|
|
|
|
Import ('env')
|
|
|
|
|
|
|
|
test_env = env.Clone()
|
|
|
|
|
2014-06-10 11:58:58 -07:00
|
|
|
test_env['LIBS'] = [env['MAPNIK_NAME']]
|
|
|
|
test_env.AppendUnique(LIBS=copy(env['LIBMAPNIK_LIBS']))
|
2015-02-11 23:47:26 -08:00
|
|
|
test_env.AppendUnique(LIBS='mapnik-wkt')
|
2014-07-22 15:36:45 -07:00
|
|
|
if env['PLATFORM'] == 'Linux':
|
2014-06-10 11:58:58 -07:00
|
|
|
test_env.AppendUnique(LIBS='dl')
|
2014-06-10 12:01:35 -07:00
|
|
|
test_env.AppendUnique(LIBS='rt')
|
2013-01-08 19:07:11 -08:00
|
|
|
test_env.AppendUnique(CXXFLAGS='-g')
|
2014-06-10 11:58:58 -07: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')
|
2014-09-30 21:16:29 -07:00
|
|
|
test_env['LINKFLAGS'] = copy(test_env['LIBMAPNIK_LINKFLAGS'])
|
2013-02-27 17:48:51 -05:00
|
|
|
if env['PLATFORM'] == 'Darwin':
|
2013-10-22 16:35:46 -04:00
|
|
|
test_env.Append(LINKFLAGS='-F/ -framework CoreFoundation')
|
2013-01-08 19:07:11 -08:00
|
|
|
|
2013-11-14 23:11:21 -08:00
|
|
|
test_env_local = test_env.Clone()
|
|
|
|
|
2014-08-13 17:21:22 -07:00
|
|
|
#benchmarks = glob.glob('test*cpp')
|
|
|
|
benchmarks = [
|
|
|
|
#"test_array_allocation.cpp",
|
|
|
|
#"test_png_encoding1.cpp",
|
|
|
|
#"test_png_encoding2.cpp",
|
|
|
|
#"test_to_string1.cpp",
|
|
|
|
#"test_to_string2.cpp",
|
|
|
|
#"test_to_bool.cpp",
|
|
|
|
#"test_to_double.cpp",
|
|
|
|
#"test_to_int.cpp",
|
|
|
|
#"test_utf_encoding.cpp"
|
2015-02-11 15:53:09 -08:00
|
|
|
"test_polygon_clipping.cpp",
|
2014-08-13 17:21:22 -07:00
|
|
|
#"test_polygon_clipping_rendering.cpp",
|
|
|
|
"test_proj_transform1.cpp",
|
|
|
|
"test_expression_parse.cpp",
|
|
|
|
"test_face_ptr_creation.cpp",
|
|
|
|
"test_font_registration.cpp",
|
|
|
|
"test_rendering.cpp",
|
2014-10-09 20:27:07 -07:00
|
|
|
"test_rendering_shared_map.cpp",
|
2015-06-08 17:13:02 -05:00
|
|
|
"test_offset_converter.cpp",
|
2015-06-12 20:52:10 -07:00
|
|
|
"test_marker_cache.cpp",
|
2015-06-19 14:19:04 +02:00
|
|
|
"test_quad_tree.cpp",
|
2015-07-15 12:59:42 -07:00
|
|
|
"test_noop_rendering.cpp",
|
2015-10-01 14:47:55 -07:00
|
|
|
"test_getline.cpp",
|
2015-05-18 11:09:50 -05:00
|
|
|
# "test_numeric_cast_vs_static_cast.cpp",
|
2014-08-13 17:21:22 -07:00
|
|
|
]
|
|
|
|
for cpp_test in benchmarks:
|
2013-11-14 23:11:21 -08:00
|
|
|
test_program = test_env_local.Program('out/'+cpp_test.replace('.cpp',''), source=[cpp_test])
|
2013-01-08 19:07:11 -08:00
|
|
|
if 'install' in COMMAND_LINE_TARGETS:
|
|
|
|
env.Alias('install',test_program)
|
2013-11-14 23:11:21 -08:00
|
|
|
#Depends(test_program, env.subst('../src/%s' % env['MAPNIK_LIB_NAME']))
|