summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2015-02-04 09:30:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-04 10:51:27 -0800
commitbd9a44379367cb6c66781bf301e3af19833a9c02 (patch)
treef81a2c5cec327b52d892b5b61ea55c7b74ac9b22 /CMakeLists.txt
parente82a0cdec5768a89037537fe20aa9dd3a7358630 (diff)
downloadsubsurface-bd9a44379367cb6c66781bf301e3af19833a9c02.tar.gz
More tolerant when parsing GPS coordinates.
Refactored the parsing logic to make it more solid (no more guessing) and more flexible (support more formats). Added a test for checking that. Fixed a few warnings. [Dirk Hohndel: some changes to coding style] Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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)