Warning, /pim/kdepim-addons/plugins/messageviewerheaderplugins/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0002 # SPDX-License-Identifier: BSD-3-Clause 0003 # convenience macro to add qtest unit tests 0004 add_definitions( -DHEADER_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" ) 0005 add_definitions( -DGRANTLEETHEME_DATA_DIR="${CMAKE_SOURCE_DIR}/examples/messageviewergrantleetheme/themes" ) 0006 0007 macro(add_messageviewer_header_unittest _source _additional) 0008 set( _test ${_source} utils.cpp ${_additional}) 0009 get_filename_component(_name ${_source} NAME_WE) 0010 add_executable( ${_name} ${_test} ${_name}.h) 0011 add_test(NAME ${_name} COMMAND ${_name} ) 0012 0013 ecm_mark_as_test(messageviewer-header-${_name}) 0014 set_tests_properties(${_name} PROPERTIES ENVIRONMENT "LC_ALL=C;TZ=UTC") 0015 target_link_libraries( ${_name} KPim6::MessageViewer KPim6::Libkleo Qt::Test KF6::KIOCore KPim6::Mime KPim6::AkonadiCore KPim6::AkonadiNotes KF6::CalendarCore KPim6::GrantleeTheme KF6::XmlGui KF6::I18n) 0016 endmacro () 0017 0018 0019 macro(add_messageviewer_header_class_unittest _source ) 0020 set( _test ${_source}) 0021 get_filename_component(_name ${_source} NAME_WE) 0022 add_executable( ${_name} ${_test} ${_name}.h) 0023 add_test(NAME ${_name} COMMAND ${_name} ) 0024 0025 ecm_mark_as_test(messageviewer-header-${_name}) 0026 set_tests_properties(${_name} PROPERTIES ENVIRONMENT "LC_ALL=C;TZ=UTC") 0027 target_link_libraries( ${_name} KPim6::MessageViewer KPim6::Libkleo Qt::Test KF6::KIOCore KPim6::Mime KPim6::AkonadiCore KPim6::AkonadiNotes KF6::CalendarCore KPim6::GrantleeTheme KF6::XmlGui) 0028 endmacro () 0029 0030 configure_file( 0031 ${CMAKE_CURRENT_SOURCE_DIR}/../enterpriseheaderstyleplugin/messageviewer_enterpriseheaderstyleplugin.json.in 0032 ${CMAKE_CURRENT_BINARY_DIR}/messageviewer_enterpriseheaderstyleplugin.json) 0033 0034 0035 add_messageviewer_header_unittest( briefheaderstyleplugintest.cpp "../briefheaderstyleplugin/briefheaderstrategy.cpp;../briefheaderstyleplugin/briefheaderstyle.cpp;../briefheaderstyleplugin/briefheaderstyleplugin.cpp;../briefheaderstyleplugin/briefheaderstyleinterface.cpp") 0036 0037 add_messageviewer_header_unittest( enterpriseheaderstyleplugintest.cpp "../enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp;../enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp;../enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp") 0038 0039 add_messageviewer_header_unittest( fancyheaderstyleplugintest.cpp "../fancyheaderstyleplugin/fancyheaderstyle.cpp;../fancyheaderstyleplugin/fancyheaderstyleplugin.cpp;../fancyheaderstyleplugin/fancyheaderstyleinterface.cpp") 0040 0041 add_messageviewer_header_unittest( grantleeheaderstyleplugintest.cpp "../grantleeheaderstyleplugin/grantleeheaderstrategy.cpp;../grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp;../grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp") 0042 0043 add_messageviewer_header_unittest( longheaderstyleplugintest.cpp "../longheaderstyleplugin/longheaderstyleplugin.cpp;../longheaderstyleplugin/longheaderstyleinterface.cpp") 0044 0045 add_messageviewer_header_unittest( standardsheaderstyleplugintest.cpp "../standardsheaderstyleplugin/standardheaderstrategy.cpp;../standardsheaderstyleplugin/standardsheaderstyleplugin.cpp;../standardsheaderstyleplugin/standardsheaderstyleinterface.cpp") 0046 0047 add_messageviewer_header_class_unittest( headerstylepluginmanagertest.cpp)