subsurface/tests/CMakeLists.txt
Tomaz Canabrava 21e8b1e363 Fix compilation with the new folder architecture
A few more fixes for things that broke in commit 7be962bfc2 ("Move
subsurface-core to core and qt-mobile to mobile-widgets").

[Dirk Hohndel: slightly edited and overlap with Linus' patch removed]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05 12:32:36 -07:00

32 lines
No EOL
919 B
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)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
DEPENDS
TestUnitConversion
TestProfile
TestGpsCoords
TestParse
TestGitStorage
TestPlan
TestDiveSiteDuplication
)