From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/3rdparty/2geom/tests/CMakeLists.txt | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/3rdparty/2geom/tests/CMakeLists.txt (limited to 'src/3rdparty/2geom/tests/CMakeLists.txt') diff --git a/src/3rdparty/2geom/tests/CMakeLists.txt b/src/3rdparty/2geom/tests/CMakeLists.txt new file mode 100644 index 0000000..e96f768 --- /dev/null +++ b/src/3rdparty/2geom/tests/CMakeLists.txt @@ -0,0 +1,54 @@ + +find_package(GTest REQUIRED MODULE) +# Use this variable for tests which provide their own main(). +SET(2GEOM_TESTS_SRC +#bezier-utils-test +#lin_alg_test +sbasis-text-test +root-find-test +implicitization-test +#timing-test +#rtree-performance-test +) + +# Use this variable for GTest tests which should have a default main(). +SET(2GEOM_GTESTS_SRC +affine-test +angle-test +bezier-test +choose-test +circle-test +convex-hull-test +coord-test +ellipse-test +elliptical-arc-test +intersection-graph-test +interval-test +line-test +nl-vector-test +parallelogram-test +path-test +point-test +polynomial-test +rect-test +sbasis-test +) + +foreach(source ${2GEOM_GTESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS}) + target_link_libraries(${source} 2geom GTest::Main ${GSL_LIBRARIES} ${GTK3_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) +endforeach() + +foreach(source ${2GEOM_TESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS}) + target_link_libraries(${source} 2geom GTest::GTest ${GSL_LIBRARIES} ${GTK3_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) +endforeach(source) + +if(WIN32 AND 2GEOM_BUILD_SHARED) + add_custom_target(copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/2geom/lib2geom.dll ${CMAKE_BINARY_DIR}/src/tests/lib2geom.dll) + add_dependencies(copy 2geom) +endif() -- cgit v1.2.3