blob: 60ceaa3348416e0197d8ebba5d15db4234421cb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
SET(2GEOM_PERFORMANCE_TESTS_SRC
example-performance-test
boolops-performance-test
bendpath-test
bezier-utils-test
parse-svg-test
path-operations-test
)
add_custom_target(perf)
OPTION(2GEOM_PERFORMANCE_TESTS
"Build the performance tests"
ON)
IF(2GEOM_PERFORMANCE_TESTS)
FOREACH(source ${2GEOM_PERFORMANCE_TESTS_SRC})
ADD_EXECUTABLE(${source} ${source}.cpp)
target_link_libraries(${source} 2Geom::2geom)
add_dependencies(perf ${source})
add_custom_command(TARGET perf COMMAND ${source})
ENDFOREACH(source)
ENDIF()
IF(WIN32 AND 2GEOM_BUILD_SHARED)
ADD_CUSTOM_TARGET(copy-perf ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/2geom/lib2geom.dll ${CMAKE_BINARY_DIR}/src/performance-tests/lib2geom.dll)
ADD_DEPENDENCIES(copy-perf 2geom)
ENDIF()
|