CMakeLists.txt tests/CMakeLists.txt
Christian Mollekopf
mollekopf at kolabsys.com
Tue Jul 31 14:15:55 CEST 2012
CMakeLists.txt | 1 +
tests/CMakeLists.txt | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 5895cd19e6105944a813bcb97f5d7735bc4d4f3e
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date: Tue Jul 31 14:15:48 2012 +0200
With this a simple "make test" runs all the tests.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2887796..0940fe9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,6 +138,7 @@ set(KOLAB_LINK_LIBRARIES
)
if(BUILD_TESTS)
#for tests only
+ enable_testing()
add_library(kolab_static STATIC ${KOLAB_SRCS})
target_link_libraries(kolab_static ${KOLAB_LINK_LIBRARIES})
add_subdirectory(tests)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a9df2b6..db582cd 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -8,23 +8,29 @@ target_link_libraries(benchmarktest ${QT_QTTEST_LIBRARY} kolab_static)
QT4_AUTOMOC(formattest.cpp)
add_executable(formattest formattest.cpp)
target_link_libraries(formattest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(formattest ${CMAKE_CURRENT_BINARY_DIR}/formattest)
QT4_AUTOMOC(upgradetest.cpp)
add_executable(upgradetest upgradetest.cpp)
target_link_libraries(upgradetest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(upgradetest ${CMAKE_CURRENT_BINARY_DIR}/upgradetest)
QT4_AUTOMOC(kcalconversiontest.cpp)
add_executable(kcalconversiontest kcalconversiontest.cpp)
target_link_libraries(kcalconversiontest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(kcalconversiontest ${CMAKE_CURRENT_BINARY_DIR}/kcalconversiontest)
QT4_AUTOMOC(calendaringtest.cpp)
add_executable(calendaringtest calendaringtest.cpp)
target_link_libraries(calendaringtest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(calendaringtest ${CMAKE_CURRENT_BINARY_DIR}/calendaringtest)
QT4_AUTOMOC(icalendartest.cpp)
add_executable(icalendartest icalendartest.cpp)
target_link_libraries(icalendartest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(icalendartest ${CMAKE_CURRENT_BINARY_DIR}/icalendartest)
QT4_AUTOMOC(freebusytest.cpp)
add_executable(freebusytest freebusytest.cpp)
-target_link_libraries(freebusytest ${QT_QTTEST_LIBRARY} kolab_static)
\ No newline at end of file
+target_link_libraries(freebusytest ${QT_QTTEST_LIBRARY} kolab_static)
+add_test(freebusytest ${CMAKE_CURRENT_BINARY_DIR}/freebusytest)
More information about the commits
mailing list