Commit 3455e85a authored by Laurent Montel's avatar Laurent Montel 😁

Fix execute autotest without install them

parent 6b15c7f4
......@@ -3,7 +3,15 @@ project(knotes)
cmake_minimum_required(VERSION 3.1)
set(KF5_VERSION "5.37.0")
find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
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 ${knotes_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
include(ECMInstallIcons)
......
add_executable(noteeditorutilstest noteeditorutilstest.cpp )
add_test(noteeditorutilstest noteeditorutilstest)
add_test(NAME noteeditorutilstest COMMAND noteeditorutilstest)
ecm_mark_as_test(noteeditorutilstest)
target_link_libraries(noteeditorutilstest Qt5::Test notesharedprivate)
......@@ -6,7 +6,7 @@ macro(add_noteshared_unittest _source)
set(_test ${_source})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test( ${_name} ${_name} )
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(noteshared-${_name})
target_link_libraries( ${_name}
notesharedprivate
......
......@@ -4,7 +4,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/
set( knotes_knotesgrantleeprint_source knotesgrantleeprinttest.cpp )
add_executable( knotesgrantleeprinttest ${knotes_knotesgrantleeprint_source})
add_test(knotesgrantleeprinttest knotesgrantleeprinttest)
add_test(NAME knotesgrantleeprinttest COMMAND knotesgrantleeprinttest)
ecm_mark_as_test(knotesgrantleeprinttest)
target_link_libraries( knotesgrantleeprinttest Qt5::Test Qt5::Gui KF5::AkonadiCore knotesprivate KF5::Mime KF5::AkonadiNotes Grantlee5::Templates KF5::PimCommon)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment