Commit ab4a463a authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Fix linking tests with MSVC

If the class is already exported from the library we cannot add the
.cpp file to the test again - MSVC then complains that the symbol is
exported twice (once from the test and once from the library that the
test is linked against)
parent abc9f7ec
Pipeline #39619 passed with stage
in 53 minutes and 42 seconds
...@@ -28,7 +28,6 @@ ecm_qt_declare_logging_category(filter_common_SRCS HEADER mailcommon_debug.h IDE ...@@ -28,7 +28,6 @@ ecm_qt_declare_logging_category(filter_common_SRCS HEADER mailcommon_debug.h IDE
add_mailcommon_filter_test(itemcontexttest add_mailcommon_filter_test(itemcontexttest
itemcontexttest.cpp itemcontexttest.cpp
../itemcontext.cpp
${filter_common_SRCS} ${filter_common_SRCS}
) )
...@@ -279,5 +278,4 @@ add_mailcommon_filter_test(filteractionmissingidentitydialogtest ...@@ -279,5 +278,4 @@ add_mailcommon_filter_test(filteractionmissingidentitydialogtest
add_mailcommon_filter_test(filterimporterpathcachetest add_mailcommon_filter_test(filterimporterpathcachetest
filterimporterpathcachetest.cpp filterimporterpathcachetest.cpp
../filterimporterpathcache.cpp
) )
...@@ -74,7 +74,7 @@ target_link_libraries(filteractionmissingtransportdialoggui ...@@ -74,7 +74,7 @@ target_link_libraries(filteractionmissingtransportdialoggui
KF5::MailTransport KF5::MailTransport
) )
set(filteractionmissingaccountdialoggui_SRCS filteractionmissingaccountdialoggui.cpp ../../../autotests/dummykernel.cpp ../../filter/kmfilteraccountlist.cpp ../dialog/filteractionmissingaccountdialog.cpp) set(filteractionmissingaccountdialoggui_SRCS filteractionmissingaccountdialoggui.cpp ../../../autotests/dummykernel.cpp ../dialog/filteractionmissingaccountdialog.cpp)
add_executable(filteractionmissingaccountdialoggui ${filteractionmissingaccountdialoggui_SRCS}) add_executable(filteractionmissingaccountdialoggui ${filteractionmissingaccountdialoggui_SRCS})
ecm_mark_as_test(filteractionmissingaccountdialoggui) ecm_mark_as_test(filteractionmissingaccountdialoggui)
target_link_libraries(filteractionmissingaccountdialoggui target_link_libraries(filteractionmissingaccountdialoggui
......
ecm_add_test(mdnstateattributetest.cpp ../mdnstateattribute.cpp ecm_add_test(mdnstateattributetest.cpp
TEST_NAME mdnattributetest TEST_NAME mdnattributetest
NAME_PREFIX "mailcommon-mdn-" NAME_PREFIX "mailcommon-mdn-"
LINK_LIBRARIES Qt5::Test Qt5::Gui KF5::AkonadiCore KF5::MailCommon LINK_LIBRARIES Qt5::Test Qt5::Gui KF5::AkonadiCore KF5::MailCommon
......
...@@ -14,7 +14,6 @@ add_search_autotest(searchruletest ...@@ -14,7 +14,6 @@ add_search_autotest(searchruletest
) )
add_search_autotest(searchrulestatustest add_search_autotest(searchrulestatustest
searchrulestatustest.cpp searchrulestatustest.cpp
../searchrule/searchrulestatus.cpp
) )
add_search_autotest(searchrulenumericaltest add_search_autotest(searchrulenumericaltest
searchrulenumericaltest.cpp searchrulenumericaltest.cpp
......
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