subsurface/tests/CMakeLists.txt
Robert C. Helling c4976b505a Test for basic image handling
This tests adding image files to dives including hashing and evaluating
exif data.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-21 13:14:56 -08:00

38 lines
1 KiB
CMake

# QTest based tests
qt5_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc)
add_library(RESOURCE_LIBRARY STATIC ${SUBSURFACE_TEST_RESOURCES})
macro(TEST NAME FILE)
add_executable(${NAME} ${FILE} )
target_link_libraries(${NAME} subsurface_corelib RESOURCE_LIBRARY ${QT_TEST_LIBRARIES} ${SUBSURFACE_LINK_LIBRARIES} )
add_test(NAME ${NAME} COMMAND $<TARGET_FILE:${NAME}>)
endmacro()
enable_testing()
add_definitions(-g)
TEST(TestUnitConversion testunitconversion.cpp)
TEST(TestProfile testprofile.cpp)
TEST(TestGpsCoords testgpscoords.cpp)
TEST(TestParse testparse.cpp)
TEST(TestPlan testplan.cpp)
TEST(TestDiveSiteDuplication testdivesiteduplication.cpp)
TEST(TestRenumber testrenumber.cpp)
TEST(TestGitStorage testgitstorage.cpp)
TEST(TestPreferences testpreferences.cpp)
TEST(TestPicture testpicture.cpp)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
DEPENDS
TestUnitConversion
TestProfile
TestGpsCoords
TestParse
TestGitStorage
TestPlan
TestDiveSiteDuplication
TestPreferences
TestRenumber
TestPicture
)