aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c8cad1bb..4a260e729 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,11 +235,13 @@ ADD_DEPENDENCIES(subsurface_interface subsurface_generated_ui)
ADD_DEPENDENCIES(subsurface_generated_ui version)
ADD_DEPENDENCIES(subsurface_corelib version)
-ENABLE_TESTING()
-ADD_EXECUTABLE(TestUnitConversion tests/testunitconversion.cpp)
-TARGET_LINK_LIBRARIES(TestUnitConversion subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer)
-ADD_TEST(NAME TestUnitConversion COMMAND TestUnitConversion)
+MACRO(test NAME FILE)
+ ADD_EXECUTABLE(${NAME} tests/${FILE})
+ TARGET_LINK_LIBRARIES(${NAME} subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer)
+ ADD_TEST(NAME ${NAME} COMMAND ${NAME})
+ENDMACRO()
-ADD_EXECUTABLE(TestProfile tests/testprofile.cpp)
-TARGET_LINK_LIBRARIES(TestProfile subsurface_corelib ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} -lzip -ldivecomputer)
-ADD_TEST(NAME TestProfile COMMAND TestProfile)
+ENABLE_TESTING()
+test(TestUnitConversion testunitconversion.cpp)
+test(TestProfile testprofile.cpp)
+test(TestGpsCoords testgpscoords.cpp)