2021-03-25 16:26:29 +00:00
|
|
|
project(mapnik-benchmark)
|
|
|
|
|
2022-08-11 20:54:50 +00:00
|
|
|
set(BENCHMARK_SRCS
|
2021-03-25 16:26:29 +00:00
|
|
|
src/normalize_angle.cpp
|
|
|
|
src/test_array_allocation.cpp
|
|
|
|
src/test_expression_parse.cpp
|
|
|
|
src/test_face_ptr_creation.cpp
|
|
|
|
src/test_font_registration.cpp
|
|
|
|
src/test_getline.cpp
|
|
|
|
src/test_marker_cache.cpp
|
|
|
|
src/test_noop_rendering.cpp
|
|
|
|
src/test_numeric_cast_vs_static_cast.cpp
|
|
|
|
src/test_offset_converter.cpp
|
|
|
|
src/test_png_encoding1.cpp
|
|
|
|
src/test_png_encoding2.cpp
|
|
|
|
src/test_polygon_clipping_rendering.cpp
|
|
|
|
src/test_polygon_clipping.cpp
|
|
|
|
src/test_proj_transform1.cpp
|
|
|
|
src/test_quad_tree.cpp
|
|
|
|
src/test_rendering_shared_map.cpp
|
|
|
|
src/test_rendering.cpp
|
|
|
|
src/test_to_bool.cpp
|
|
|
|
src/test_to_double.cpp
|
|
|
|
src/test_to_int.cpp
|
|
|
|
src/test_to_string1.cpp
|
|
|
|
src/test_to_string2.cpp
|
|
|
|
src/test_utf_encoding.cpp
|
|
|
|
)
|
2021-04-09 13:50:50 +00:00
|
|
|
function(mapnik_create_benchmark)
|
2021-03-25 16:26:29 +00:00
|
|
|
get_filename_component(BENCHNAME ${ARGV0} NAME_WE)
|
2021-04-09 13:50:50 +00:00
|
|
|
set(TARGET_NAME "mapnik-benchmark-${BENCHNAME}")
|
|
|
|
add_executable(${TARGET_NAME} ${ARGV0})
|
|
|
|
target_include_directories(${TARGET_NAME} PRIVATE include)
|
2021-09-14 18:46:43 +00:00
|
|
|
target_link_libraries(${TARGET_NAME} PRIVATE mapnik::agg mapnik::mapnik)
|
2022-08-11 20:54:50 +00:00
|
|
|
set_target_properties(${TARGET_NAME} PROPERTIES
|
2021-10-25 16:58:55 +00:00
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}"
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${MAPNIK_OUTPUT_DIR}/lib"
|
2022-01-27 17:31:33 +00:00
|
|
|
OUTPUT_NAME "${BENCHNAME}"
|
2021-10-25 16:58:55 +00:00
|
|
|
)
|
2021-04-09 13:50:50 +00:00
|
|
|
endfunction()
|
2021-03-25 16:26:29 +00:00
|
|
|
|
|
|
|
foreach(benchmark ${BENCHMARK_SRCS})
|
|
|
|
mapnik_create_benchmark(${benchmark})
|
|
|
|
endforeach()
|
2022-01-27 17:31:33 +00:00
|
|
|
|
|
|
|
file(COPY data DESTINATION "${MAPNIK_OUTPUT_DIR}/benchmark")
|
2022-08-11 20:54:50 +00:00
|
|
|
file(COPY run_benchmarks
|
|
|
|
DESTINATION "${MAPNIK_OUTPUT_DIR}"
|
2022-01-27 17:31:33 +00:00
|
|
|
FILE_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ
|
|
|
|
)
|