summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/2geom/src/performance-tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/2geom/src/performance-tests/CMakeLists.txt')
-rw-r--r--src/3rdparty/2geom/src/performance-tests/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/3rdparty/2geom/src/performance-tests/CMakeLists.txt b/src/3rdparty/2geom/src/performance-tests/CMakeLists.txt
new file mode 100644
index 0000000..60ceaa3
--- /dev/null
+++ b/src/3rdparty/2geom/src/performance-tests/CMakeLists.txt
@@ -0,0 +1,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()