summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-16 13:58:41 +0200
committerMontel Laurent <[email protected]>2017-08-16 13:58:41 +0200
commitf5725fce69123d0ac6a53e633d9eda6ae4299d01 (patch)
treebcf9de6d4af57a3d2fa11aee6ed5e2196730f95f
parent41c3b1cc1832089704c7d5be97fec20edf067334 (diff)
Allow to run test without install it
-rw-r--r--CMakeLists.txt10
-rw-r--r--autotests/CMakeLists.txt6
2 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb458d9..8c85606 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,15 @@ set(PIM_VERSION "5.6.40")
project(incidenceeditor VERSION ${PIM_VERSION})
set(KF5_VERSION "5.37.0")
-find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
+option(RUN_UNINSTALL "test run uninstalled apps (experimental)" FALSE)
+
+set(ECM_VERSION ${KF5_VERSION})
+# ECM setup
+if (RUN_UNINSTALL)
+ set(ECM_VERSION "5.38.0")
+endif()
+
+find_package(ECM ${ECM_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
set(LIBRARY_NAMELINK)
include(GenerateExportHeader)
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 07adff3..66eb4fb 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -10,7 +10,7 @@ set(grant_lib KGantt)
MACRO(IE_UNIT_TESTS)
FOREACH(_testname ${ARGN})
add_executable( ${_testname} ${_testname}.cpp modeltest.cpp )
- add_test( ${_testname} ${_testname} )
+ add_test(NAME ${_testname} COMMAND ${_testname} )
ecm_mark_as_test(${_testname})
target_link_libraries(${_testname} Qt5::Test KF5::AkonadiCore ${grant_lib} KF5::CalendarUtils KF5::CalendarCore KF5::IncidenceEditor KF5::KdepimDBusInterfaces KF5::Libkdepim)
ENDFOREACH(_testname)
@@ -32,7 +32,7 @@ IE_UNIT_TESTS(
set(ktimezonecomboboxtest_SRCS ktimezonecomboboxtest.cpp)
add_executable(ktimezonecomboboxtest ${ktimezonecomboboxtest_SRCS})
-add_test(ktimezonecomboboxtest ktimezonecomboboxtest)
+add_test(NAME ktimezonecomboboxtest COMMAND ktimezonecomboboxtest)
ecm_mark_as_test(ktimezonecomboboxtest)
target_link_libraries(
@@ -44,7 +44,7 @@ target_link_libraries(
add_executable(testindividualmaildialog testindividualmaildialog.cpp ../src/individualmaildialog.cpp)
ecm_mark_nongui_executable(testindividualmaildialog)
-add_test(testindividualmaildialog testindividualmaildialog)
+add_test(NAME testindividualmaildialog COMMAND testindividualmaildialog)
ecm_mark_as_test(testindividualmaildialog)
target_link_libraries(testindividualmaildialog
KF5::CalendarCore