aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-16 13:59:55 +0200
committerMontel Laurent <[email protected]>2017-08-16 13:59:55 +0200
commitfeb284c336e654af916165e37ab3af2e0c05ef4c (patch)
tree75ad0dc4c7363ea4c6fbb04086d5082df5ca948b
parentba5fc430dfb0dea8df3ed6023510d1ed1f288478 (diff)
Allow to run test without install it
-rw-r--r--CMakeLists.txt10
-rw-r--r--autotests/CMakeLists.txt2
2 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1273ca7..2a0704c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,15 @@ project(KIMAP VERSION ${PIM_VERSION})
# ECM setup
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} ${KIMAP_SOURCE_DIR}/cmake)
include(GenerateExportHeader)
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 12be236..483ab11 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -9,7 +9,7 @@ add_subdirectory(kimaptest)
macro(KIMAP_UNIT_TESTS)
foreach(_testname ${ARGN})
add_executable(${_testname} ${_testname}.cpp)
- add_test(${_testname} ${_testname})
+ add_test(NAME ${_testname} COMMAND ${_testname})
ecm_mark_as_test(${_testname})
target_link_libraries(${_testname} KF5IMAP Qt5::Test kimaptest Qt5::Network)
set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")