Commit c9dda27e authored by Laurent Montel's avatar Laurent Montel 😁

Make run without install them

parent 7dd4b4ae
......@@ -6,7 +6,15 @@ if (POLICY CMP0063)
endif()
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 ${ECM_MODULE_PATH})
# Do NOT add quote
......
......@@ -2,7 +2,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -11,7 +11,7 @@ macro( kaddressbook_merge _source _additional _additionallib)
set( _test ${_source} ${_additional})
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(kaddressbookmerge-${_name})
target_link_libraries( ${_name} kaddressbookmergelibprivate Qt5::Test KF5::AkonadiCore KF5::Contacts ${_additionallib})
endmacro()
......@@ -39,7 +39,7 @@ add_akonadi_isolated_test_advanced(mergecontactwidgetlisttest.cpp "${kaddressboo
set( kaddressbook_merge_mergecontactloseinformationwarning_source mergecontactloseinformationwarningtest.cpp ../widgets/mergecontactloseinformationwarning.cpp ${kaddressbookmergelibprivate_common_SRCS})
add_executable( mergecontactloseinformationwarningtest ${kaddressbook_merge_mergecontactloseinformationwarning_source})
add_test(mergecontactloseinformationwarningtest mergecontactloseinformationwarningtest)
add_test(NAME mergecontactloseinformationwarningtest COMMAND mergecontactloseinformationwarningtest)
ecm_mark_as_test(mergecontactloseinformationwarningtest)
target_link_libraries( mergecontactloseinformationwarningtest Qt5::Test Qt5::Gui kaddressbookmergelibprivate KF5::WidgetsAddons KF5::I18n)
......@@ -2,7 +2,7 @@ macro(add_kmail_externalcomposer_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_editorinitplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::Libkdepim KF5::KIOWidgets)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional} ${changecaseplugineditor_common_SRCS})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_editorplugin_unittest _source _additional)
set( _test ${_source} ${_additional} ${zoomdebug_SRCS})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n)
......
......@@ -7,7 +7,7 @@ macro(add_kmail_automaticaddscontacts_unittest _source _additional)
set( _test ${_source} ${_additional} ${automaticaddcontacts_common_SRCS})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::PimCommon KF5::AkonadiContact KF5::Libkdepim)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_checkbeforesend_unittest _source _additional)
set( _test ${_source} ${_additional} ${checkbeforesend_common_SRCS})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::PimCommon)
......
......@@ -5,7 +5,7 @@ macro(add_kmail_confirmaddress_unittest _source _additional)
set( _test ${_source} ${_additional} ${confirmaddressplugin_common_SRCS})
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(kmail_editorplugin-${_name})
target_link_libraries( ${_name} Qt5::Test KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::PimCommon)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_antispamplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_antispamplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::IconThemes KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_antivirusplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_antivirusplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::IconThemes KF5::AkonadiWidgets KF5::MailCommon KF5::Libkdepim KF5::I18n)
......
......@@ -2,7 +2,7 @@ macro(add_kmail_logactivitiesplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(kmail_logactivitiesplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::XmlGui KF5::Completion KF5::IconThemes KF5::PimCommonAkonadi KF5::Libkdepim KF5::I18n)
......
......@@ -4,7 +4,7 @@ macro(add_messageviewer_header_unittest _source _additional)
set( _test ${_source} ${_additional})
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(messageviewer-header-${_name})
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
......@@ -15,7 +15,7 @@ macro(add_messageviewer_header_class_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(messageviewer-header-${_name})
target_link_libraries( ${_name} KF5::MessageViewer KF5::Libkleo Qt5::Test KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::AkonadiNotes KF5::CalendarCore KF5::GrantleeTheme)
......
......@@ -7,7 +7,7 @@ macro(add_plasma_pimeventsplugin_test _source _additional)
)
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(plasma-pimeventsplugin-${_name})
add_definitions(-DPIMEVENT_DATADIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
target_link_libraries(${_name} Qt5::Core
......
......@@ -2,7 +2,7 @@ macro(add_templateparserplugin_unittest _source _extrasources)
set(_test ${_source} ${_extrasources})
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(templateparserplugin-${_name})
target_link_libraries(${_name}
KF5::TemplateParser
......
......@@ -15,7 +15,7 @@ ecm_add_test(adblockinterceptorinterfacetest.cpp ${messageviewer_adblock_test_co
set( adblockpluginurlinterceptortest_SRCS ${messageviewer_adblock_test_common_SRCS} adblockpluginurlinterceptortest.cpp ../adblockpluginurlinterceptor.cpp ../adblockinterceptorinterface.cpp )
add_executable( adblockpluginurlinterceptortest ${adblockpluginurlinterceptortest_SRCS})
add_test(adblockpluginurlinterceptortest adblockpluginurlinterceptortest)
add_test(NAME adblockpluginurlinterceptortest COMMAND adblockpluginurlinterceptortest)
ecm_mark_as_test(adblockpluginurlinterceptortest)
target_link_libraries( adblockpluginurlinterceptortest Qt5::Test Qt5::Widgets adblocklibprivate KF5::MessageViewer
Qt5::WebEngine Qt5::WebEngineWidgets KF5::ItemViews KF5::KIOWidgets KF5::XmlGui KF5::I18n KF5::WebEngineViewer)
......@@ -4,7 +4,7 @@ ecm_qt_declare_logging_category(messageviewer_adblock_test_common_SRCS HEADER ad
set( adblockpluginurlinterceptorconfigurewidgettest_SRCS ${messageviewer_adblock_test_common_SRCS} adblockpluginurlinterceptorconfigurewidgettest.cpp ../widgets/adblockpluginurlinterceptorconfigurewidget.cpp)
add_executable( adblockpluginurlinterceptorconfigurewidgettest ${adblockpluginurlinterceptorconfigurewidgettest_SRCS})
add_test(adblockpluginurlinterceptorconfigurewidgettest adblockpluginurlinterceptorconfigurewidgettest)
add_test(NAME adblockpluginurlinterceptorconfigurewidgettest COMMAND adblockpluginurlinterceptorconfigurewidgettest)
ecm_mark_as_test(adblockpluginurlinterceptorconfigurewidgettest)
target_link_libraries( adblockpluginurlinterceptorconfigurewidgettest adblocklibprivate Qt5::Test Qt5::Widgets KF5::MessageViewer
KF5::ItemViews Qt5::WebEngine Qt5::WebEngineWidgets KF5::KIOWidgets KF5::I18n KF5::WebEngineViewer)
......@@ -12,7 +12,7 @@ target_link_libraries( adblockpluginurlinterceptorconfigurewidgettest adblocklib
set( adblockblockableitemsdialogtest_SRCS ${messageviewer_adblock_test_common_SRCS} adblockblockableitemsdialogtest.cpp)
add_executable( adblockblockableitemsdialogtest ${adblockblockableitemsdialogtest_SRCS})
add_test(adblockblockableitemsdialogtest adblockblockableitemsdialogtest)
add_test(NAME adblockblockableitemsdialogtest COMMAND adblockblockableitemsdialogtest)
ecm_mark_as_test(adblockblockableitemsdialogtest)
target_link_libraries( adblockblockableitemsdialogtest adblocklibprivate Qt5::Test Qt5::Widgets KF5::I18n KF5::MessageViewer
KF5::PimCommon KF5::ItemViews Qt5::WebEngine Qt5::WebEngineWidgets KF5::ConfigCore KF5::KIOWidgets KF5::WebEngineViewer)
......@@ -20,13 +20,13 @@ target_link_libraries( adblockblockableitemsdialogtest adblocklibprivate Qt5::Te
set( adblockblockableitemsjobtest_SRCS ${messageviewer_adblock_test_common_SRCS} adblockblockableitemsjobtest.cpp ../adblockblockableitemsjob.cpp)
add_executable( adblockblockableitemsjobtest ${adblockblockableitemsjobtest_SRCS})
add_test(adblockblockableitemsjobtest adblockblockableitemsjobtest)
add_test(NAME adblockblockableitemsjobtest COMMAND adblockblockableitemsjobtest)
ecm_mark_as_test(adblockblockableitemsjobtest)
target_link_libraries( adblockblockableitemsjobtest adblocklibprivate Qt5::Test Qt5::WebEngine Qt5::WebEngineWidgets KF5::I18n KF5::WebEngineViewer)
set( adblockresulttest_SRCS ${messageviewer_adblock_test_common_SRCS} adblockresulttest.cpp ../adblockblockableitemsjob.cpp)
add_executable( adblockresulttest ${adblockresulttest_SRCS})
add_test(adblockresulttest adblockresulttest)
add_test(NAME adblockresulttest COMMAND adblockresulttest)
ecm_mark_as_test(adblockresulttest)
target_link_libraries( adblockresulttest adblocklibprivate Qt5::Test Qt5::WebEngine Qt5::WebEngineWidgets KF5::WebEngineViewer)
......@@ -3,6 +3,6 @@ kconfig_add_kcfg_files(donottrackpluginurlinterceptortest_SRCS
../settings/donottracksettings.kcfgc
)
add_executable( donottrackpluginurlinterceptortest ${donottrackpluginurlinterceptortest_SRCS})
add_test(donottrackpluginurlinterceptortest donottrackpluginurlinterceptortest)
add_test(NAME donottrackpluginurlinterceptortest COMMAND donottrackpluginurlinterceptortest)
ecm_mark_as_test(donottrackpluginurlinterceptortest)
target_link_libraries( donottrackpluginurlinterceptortest Qt5::Test Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::WebEngineViewer)
......@@ -2,7 +2,7 @@ macro(add_sieveeditorplugin_unittest _source _additional)
set( _test ${_source} ${_additional} ${sieveeditor_plugin_categories_SRCS})
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(sieveeditorplugin-${_name})
target_link_libraries( ${_name} Qt5::Widgets Qt5::Test KF5::IMAP KF5::CoreAddons KF5::KIOCore KF5::I18n KF5::Completion KF5::KIOWidgets KF5::KSieveUi KF5::MailTransport KF5::ItemModels)
......
......@@ -2,7 +2,7 @@ macro(add_regexpeditorplugin_unittest _source _additional)
set( _test ${_source} ${_additional})
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(sieveeditorplugin-${_name})
target_link_libraries( ${_name} Qt5::Widgets Qt5::Test KF5::I18n KF5::KSieveUi KF5::TextWidgets)
......
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