Warning, /pim/kdepim-addons/kaddressbook/plugins/mergelib/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 0004 set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) 0005 0006 set(kaddressbookmergelibprivate_common_SRCS) 0007 ecm_qt_declare_logging_category(kaddressbookmergelibprivate_common_SRCS HEADER kaddressbookmergelibprivate_debug.h IDENTIFIER KADDRESSBOOKMERGELIBPRIVATE_LOG CATEGORY_NAME org.kde.pim.kaddressbookmergelibprivate) 0008 0009 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. ) 0010 include_directories(${CMAKE_BINARY_DIR}/kaddressbook/) 0011 0012 # Convenience macro to add unit tests. 0013 macro( kaddressbook_merge _source _additional _additionallib) 0014 set( _test ${_source} ${_additional}) 0015 get_filename_component( _name ${_source} NAME_WE ) 0016 add_executable( ${_name} ${_test} ${_name}.h) 0017 add_test(NAME ${_name} COMMAND ${_name} ) 0018 ecm_mark_as_test(kaddressbookmerge-${_name}) 0019 target_link_libraries( ${_name} kaddressbookmergelibprivate Qt::Test KPim6::AkonadiCore KF6::Contacts KF6::I18n ${_additionallib}) 0020 endmacro() 0021 0022 kaddressbook_merge(mergecontactstest.cpp "../job/mergecontacts.cpp;../kaddressbookmergelibprivate_debug.cpp" "") 0023 0024 if (KDEPIM_RUN_AKONADI_TEST) 0025 set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE) 0026 set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE) 0027 0028 add_akonadi_isolated_test_advanced( mergecontactinfowidgettest.cpp "../widgets/mergecontactinfowidget.cpp;${kaddressbookmergelibprivate_common_SRCS}" "KPim6::AkonadiContactWidgets") 0029 add_akonadi_isolated_test_advanced( mergecontactwidgettest.cpp "../widgets/mergecontactinfowidget.cpp;${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts;KPim6::AkonadiContactWidgets;KF6::WidgetsAddons") 0030 add_akonadi_isolated_test_advanced( searchandmergecontactduplicatecontactdialogtest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts") 0031 add_akonadi_isolated_test_advanced( searchduplicateresultwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts;KF6::WidgetsAddons;KPim6::AkonadiWidgets;KPim6::AkonadiContactWidgets") 0032 add_akonadi_isolated_test_advanced( resultduplicatetreewidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts") 0033 add_akonadi_isolated_test_advanced( searchpotentialduplicatecontactjobtest.cpp "${kaddressbookmergelibprivate_common_SRCS};../job/searchpotentialduplicatecontactjob.cpp" "KF6::Contacts") 0034 add_akonadi_isolated_test_advanced( mergecontactselectinformationwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts") 0035 add_akonadi_isolated_test_advanced( mergecontactselectlistwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts") 0036 0037 add_akonadi_isolated_test_advanced( mergecontactselectinformationscrollareatest.cpp "${kaddressbookmergelibprivate_common_SRCS};../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF6::Contacts;KPim6::AkonadiContactWidgets") 0038 0039 add_akonadi_isolated_test_advanced( mergecontactselectinformationtabwidgettest.cpp "${kaddressbookmergelibprivate_common_SRCS}" "kaddressbookmergelibprivate;KF6::Contacts") 0040 0041 add_akonadi_isolated_test_advanced(mergecontactsdialogtest.cpp "${kaddressbookmergelibprivate_common_SRCS};../widgets/mergecontacterrorlabel.cpp;../widgets/mergecontactinfowidget.cpp" "kaddressbookmergelibprivate;KF6::Contacts;KPim6::AkonadiContactWidgets;KF6::I18n;KF6::WidgetsAddons") 0042 add_akonadi_isolated_test_advanced(mergecontactwidgetlisttest.cpp "${kaddressbookmergelibprivate_common_SRCS};../manualmerge/mergecontactwidgetlist.cpp;" "kaddressbookmergelibprivate;KF6::Contacts;KPim6::AkonadiContactWidgets;KF6::I18n") 0043 0044 endif() 0045 0046 set( kaddressbook_merge_mergecontactloseinformationwarning_source mergecontactloseinformationwarningtest.cpp ${kaddressbookmergelibprivate_common_SRCS}) 0047 add_executable( mergecontactloseinformationwarningtest ${kaddressbook_merge_mergecontactloseinformationwarning_source}) 0048 add_test(NAME mergecontactloseinformationwarningtest COMMAND mergecontactloseinformationwarningtest) 0049 ecm_mark_as_test(mergecontactloseinformationwarningtest) 0050 target_link_libraries( mergecontactloseinformationwarningtest Qt::Test Qt::Gui kaddressbookmergelibprivate KF6::WidgetsAddons KF6::I18n) 0051