Commit 45dfdef5 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖 Committed by Laurent Montel
Browse files

Tests: avoid building CPP files that are exported from a linked SO as well

MSVC doesn't like when the same symbol appears in the executable as well
as in the linked library. Since the symbol is experted, there's no need
to explicitly build the CPP file as part of the test.
parent 59bb4c41
...@@ -94,7 +94,7 @@ if (KDEPIM_RUN_AKONADI_TEST) ...@@ -94,7 +94,7 @@ if (KDEPIM_RUN_AKONADI_TEST)
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE) set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE) set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
add_akonadi_isolated_test_advanced( followupreminderselectdatedialogtest.cpp "../src/followupreminder/followupreminderselectdatedialog.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::I18n") add_akonadi_isolated_test_advanced(followupreminderselectdatedialogtest.cpp "" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::I18n")
add_akonadi_isolated_test_advanced( attachmentvcardfromaddressbookjobtest.cpp "../src/job/attachmentvcardfromaddressbookjob.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::Contacts;KF5::AkonadiContact;KF5::I18n") add_akonadi_isolated_test_advanced(attachmentvcardfromaddressbookjobtest.cpp "" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::Contacts;KF5::AkonadiContact;KF5::I18n")
endif() endif()
...@@ -2,27 +2,25 @@ set(testwebengineviewer_webengine_common_SRCS) ...@@ -2,27 +2,25 @@ set(testwebengineviewer_webengine_common_SRCS)
ecm_qt_declare_logging_category(testwebengineviewer_webengine_common_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME org.kde.pim.webengineviewer) ecm_qt_declare_logging_category(testwebengineviewer_webengine_common_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME org.kde.pim.webengineviewer)
add_definitions( -DCHECKPHISHINGURL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" ) add_definitions( -DCHECKPHISHINGURL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
ecm_add_test(checkphishingurljobtest.cpp ../checkphishingurljob.cpp ../updatedatabaseinfo.cpp ../checkphishingurlutil.cpp ${testwebengineviewer_webengine_common_SRCS} ecm_add_test(checkphishingurljobtest.cpp ${testwebengineviewer_webengine_common_SRCS}
TEST_NAME checkphishingurljobtest TEST_NAME checkphishingurljobtest
NAME_PREFIX "webengineview-" NAME_PREFIX "webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
) )
ecm_add_test(createphishingurldatabasejobtest.cpp ../checkphishingurlutil.cpp ../updatedatabaseinfo.cpp ../createphishingurldatabasejob.cpp ${testwebengineviewer_webengine_common_SRCS} ecm_add_test(createphishingurldatabasejobtest.cpp ${testwebengineviewer_webengine_common_SRCS}
TEST_NAME createphishingurldatabasejobtest TEST_NAME createphishingurldatabasejobtest
NAME_PREFIX "webengineview-" NAME_PREFIX "webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
) )
ecm_add_test(localdatabasemanagertest.cpp ${testwebengineviewer_webengine_common_SRCS}
ecm_add_test(localdatabasemanagertest.cpp ../checkphishingurlutil.cpp ../updatedatabaseinfo.cpp ../localdatabasemanager.cpp ${testwebengineviewer_webengine_common_SRCS}
TEST_NAME localdatabasemanagertest TEST_NAME localdatabasemanagertest
NAME_PREFIX "webengineview-" NAME_PREFIX "webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
) )
ecm_add_test(searchfullhashjobtest.cpp ../checkphishingurlutil.cpp ../updatedatabaseinfo.cpp ../searchfullhashjob.cpp ${testwebengineviewer_webengine_common_SRCS} ecm_add_test(searchfullhashjobtest.cpp ${testwebengineviewer_webengine_common_SRCS}
TEST_NAME searchfullhashjobtest TEST_NAME searchfullhashjobtest
NAME_PREFIX "webengineview-" NAME_PREFIX "webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
......
...@@ -21,7 +21,7 @@ enum UrlStatus { ...@@ -21,7 +21,7 @@ enum UrlStatus {
}; };
QString apiKey(); QString apiKey();
QString versionApps(); WEBENGINEVIEWER_EXPORT QString versionApps();
QString databaseFileName(); QString databaseFileName();
WEBENGINEVIEWER_EXPORT QString configFileName(); WEBENGINEVIEWER_EXPORT QString configFileName();
WEBENGINEVIEWER_EXPORT quint16 minorVersion(); WEBENGINEVIEWER_EXPORT quint16 minorVersion();
......
ecm_add_test(findbarbasetest.cpp ../findbarbase.cpp ecm_add_test(findbarbasetest.cpp
TEST_NAME findbarbasetest TEST_NAME findbarbasetest
NAME_PREFIX "webengineviewer-findbar-" NAME_PREFIX "webengineviewer-findbar-"
LINK_LIBRARIES Qt5::Test Qt5::Widgets Qt5::Gui KF5::Completion KF5::I18n KF5::ConfigWidgets KF5::PimCommon LINK_LIBRARIES KF5WebEngineViewer Qt5::Test Qt5::Widgets Qt5::Gui KF5::Completion KF5::I18n KF5::ConfigWidgets KF5::PimCommon
) )
set_property(TARGET findbarbasetest PROPERTY INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/webengineviewer ${CMAKE_BINARY_DIR}/webengineviewer/src) set_property(TARGET findbarbasetest PROPERTY INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/webengineviewer ${CMAKE_BINARY_DIR}/webengineviewer/src)
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