┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2017-05-21 21:41:13 +0200
committerElvis Angelaccio <[email protected]>2017-05-27 10:23:47 +0200
commit4216c7e6bade899bcc5636acb0529fdcadf0956c (patch)
treef4682e3c1a57607a6f976f8d6ef574e315d3ada3 /src/tests/CMakeLists.txt
parent4d9c396a9877ff459703c6372b5426860a32400b (diff)
Move non-exported code to a static library
This allows us to speed up the compilation because we don't need to build twice the source files we use in the unit tests. Test Plan: Builds, dolphin works and tests pass. Reviewers: emmanuelp, dfaure Differential Revision: https://phabricator.kde.org/D5935
Diffstat (limited to 'src/tests/CMakeLists.txt')
-rw-r--r--src/tests/CMakeLists.txt42
1 files changed, 11 insertions, 31 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index f29ae53d4..fa47ca2cb 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -14,35 +14,22 @@ ecm_add_test(kitemrangetest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test)
ecm_add_test(kitemlistselectionmanagertest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test)
# KItemListControllerTest
-
-kconfig_add_kcfg_files(kitemlistcontrollertest_SRCS GENERATE_MOC
- ../settings/dolphin_generalsettings.kcfgc
-)
-ecm_add_test(kitemlistcontrollertest.cpp testdir.cpp ../dolphindebug.cpp ${kitemlistcontrollertest_SRCS}
+ecm_add_test(kitemlistcontrollertest.cpp testdir.cpp
TEST_NAME kitemlistcontrollertest
LINK_LIBRARIES dolphinprivate Qt5::Test)
# KFileItemListViewTest
-kconfig_add_kcfg_files(kfileitemlistviewtest_SRCS GENERATE_MOC
- ../settings/dolphin_generalsettings.kcfgc
-)
-ecm_add_test(kfileitemlistviewtest.cpp testdir.cpp ../dolphindebug.cpp ${kfileitemlistviewtest_SRCS}
+ecm_add_test(kfileitemlistviewtest.cpp testdir.cpp
TEST_NAME kfileitemlistviewtest
LINK_LIBRARIES dolphinprivate Qt5::Test)
# KFileItemModelTest
-kconfig_add_kcfg_files(kfileitemmodeltest_SRCS GENERATE_MOC
- ../settings/dolphin_generalsettings.kcfgc
-)
-ecm_add_test(kfileitemmodeltest.cpp testdir.cpp ../dolphindebug.cpp ${kfileitemmodeltest_SRCS}
+ecm_add_test(kfileitemmodeltest.cpp testdir.cpp
TEST_NAME kfileitemmodeltest
-LINK_LIBRARIES dolphinprivate Qt5::Test)
+LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
# KFileItemModelBenchmark
-kconfig_add_kcfg_files(kfileitemmodelbenchmark_SRCS GENERATE_MOC
- ../settings/dolphin_generalsettings.kcfgc
-)
-ecm_add_test(kfileitemmodelbenchmark.cpp testdir.cpp ../dolphindebug.cpp ${kfileitemmodelbenchmark_SRCS}
+ecm_add_test(kfileitemmodelbenchmark.cpp testdir.cpp
TEST_NAME kfileitemmodelbenchmark
LINK_LIBRARIES dolphinprivate Qt5::Test)
@@ -51,24 +38,17 @@ ecm_add_test(kitemlistkeyboardsearchmanagertest.cpp LINK_LIBRARIES dolphinprivat
# DolphinSearchBox
if (KF5Baloo_FOUND)
- kconfig_add_kcfg_files(dolphinsearchboxtest_SRCS
- ../search/dolphin_searchsettings.kcfgc
- )
- ecm_add_test(dolphinsearchboxtest.cpp ../search/dolphinfacetswidget.cpp ../search/dolphinsearchbox.cpp ${dolphinsearchboxtest_SRCS}
+ ecm_add_test(dolphinsearchboxtest.cpp
TEST_NAME dolphinsearchboxtest
- LINK_LIBRARIES dolphinprivate Qt5::Test)
+ LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
endif()
# KStandardItemModelTest
-ecm_add_test(kstandarditemmodeltest.cpp ../dolphindebug.cpp
+ecm_add_test(kstandarditemmodeltest.cpp
TEST_NAME kstandarditemmodeltest
-LINK_LIBRARIES dolphinprivate Qt5::Test)
+LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)
# ViewPropertiesTest
-kconfig_add_kcfg_files(viewpropertiestest_SRCS GENERATE_MOC
- ../settings/dolphin_generalsettings.kcfgc
- ../settings/dolphin_directoryviewpropertysettings.kcfgc
-)
-ecm_add_test(viewpropertiestest.cpp testdir.cpp ../dolphindebug.cpp ${viewpropertiestest_SRCS}
+ecm_add_test(viewpropertiestest.cpp testdir.cpp
TEST_NAME viewpropertiestest
-LINK_LIBRARIES dolphinprivate Qt5::Test)
+LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test)