Commit 3c3c711c authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Fix linking with MSVC

No need to compile source files into tests if they are already exported
from a library that the test is linked against. LD does not mind, but
MSVC complains very loudly.
parent df880856
set(customfieldswidgettest_SRCS customfieldswidgettest.cpp ../customfieldswidget.cpp ../customfieldeditorwidget.cpp ../customfieldslistwidget.cpp ../customfieldsmodel.cpp
../../../customfields.cpp ../customfieldslistdelegate.cpp ../../../customfieldmanager.cpp ../../utils/utils.cpp)
../customfieldslistdelegate.cpp ../../utils/utils.cpp)
add_executable(customfieldswidgettest ${customfieldswidgettest_SRCS})
add_test(customfieldswidgettest customfieldswidgettest)
ecm_mark_as_test(customfieldswidgettest)
target_link_libraries(customfieldswidgettest Qt5::Test Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion KF5::ConfigCore KF5::WidgetsAddons)
target_link_libraries(customfieldswidgettest Qt5::Test Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion KF5::ConfigCore KF5::WidgetsAddons)
set(customfieldeditorwidgettest_SRCS customfieldeditorwidgettest.cpp ../customfieldeditorwidget.cpp ../../../customfields.cpp)
set(customfieldeditorwidgettest_SRCS customfieldeditorwidgettest.cpp ../customfieldeditorwidget.cpp)
add_executable(customfieldeditorwidgettest ${customfieldeditorwidgettest_SRCS})
add_test(customfieldeditorwidgettest customfieldeditorwidgettest)
ecm_mark_as_test(customfieldeditorwidgettest)
target_link_libraries(customfieldeditorwidgettest Qt5::Test Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion KF5::WidgetsAddons)
target_link_libraries(customfieldeditorwidgettest Qt5::Test Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion KF5::WidgetsAddons)
set(customfieldslistwidgettest_SRCS customfieldslistwidgettest.cpp ../customfieldslistwidget.cpp ../../../customfields.cpp ../customfieldsmodel.cpp
../customfieldslistdelegate.cpp ../../../customfieldmanager.cpp ../../utils/utils.cpp)
set(customfieldslistwidgettest_SRCS customfieldslistwidgettest.cpp ../customfieldslistwidget.cpp ../customfieldsmodel.cpp
../customfieldslistdelegate.cpp ../../utils/utils.cpp)
add_executable(customfieldslistwidgettest ${customfieldslistwidgettest_SRCS})
add_test(customfieldslistwidgettest customfieldslistwidgettest)
ecm_mark_as_test(customfieldslistwidgettest)
......
......@@ -22,9 +22,9 @@
#include "customfieldswidgettest.h"
#include "../customfieldswidget.h"
#include "../customfieldeditorwidget.h"
#include "../customfieldslistwidget.h"
#include <QTest>
#include <editor/customfieldeditor/customfieldeditorwidget.h>
#include <editor/customfieldeditor/customfieldslistwidget.h>
CustomFieldsWidgetTest::CustomFieldsWidgetTest(QObject *parent)
: QObject(parent)
......
......@@ -3,9 +3,7 @@ set(customfieldeditor_SRCS
../customfieldeditorwidget.cpp
../customfieldslistwidget.cpp
../customfieldsmodel.cpp
../../../customfields.cpp
../customfieldslistdelegate.cpp
../../../customfieldmanager.cpp
../../utils/utils.cpp
main.cpp
)
......
set(generalinfoeditor_SRCS
main.cpp
../generalinfowidget.cpp
../phone/phonewidget.cpp
../phone/phonelistwidget.cpp
../phone/phonewidgetlister.cpp
../../widgets/kwidgetlister.cpp
../web/webwidgetlister.cpp
../web/weblistwidget.cpp
../web/webwidget.cpp
../mail/maillistwidget.cpp
../mail/mailwidget.cpp
../mail/mailwidgetlister.cpp
../messaging/messaginglistwidget.cpp
../messaging/messagingwidget.cpp
../messaging/messagingwidgetlister.cpp
../../widgets/imagewidget.cpp
../namewidget.cpp
../nicknamewidget.cpp
../phone/phonecomboboxtype.cpp
../../im/imaddress.cpp
../../utils/utils.cpp
../categorieseditwidget.cpp
../nameeditdialog.cpp
../../widgets/contacteditorcombobox.cpp
../../widgets/preferredlineeditwidget.cpp
../phone/phonetypedialog.cpp
../displaynameeditwidget.cpp
../contactselecttypecombobox.cpp
)
add_executable(generalinfoeditortest ${generalinfoeditor_SRCS})
......
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