From aba253217d70672e2e724d495daf68538f19f849 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 6 Jul 2021 13:59:02 +0200 Subject: [PATCH] Avoid intermediate variable, pass sources directly to ecm_add_test NO_CHANGELOG --- autotests/CMakeLists.txt | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 32ca75404..9e6fecd88 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -48,20 +48,27 @@ if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND endif() if(HAVE_X11) - set(dialognativetest_srcs dialognativetest.cpp) - ecm_add_test(${dialognativetest_srcs} TEST_NAME dialognativetest LINK_LIBRARIES Qt5::Gui Qt5::Test Qt5::Qml Qt5::Quick KF5::WindowSystem KF5::Plasma KF5::PlasmaQuick) + ecm_add_test( + dialognativetest.cpp + TEST_NAME dialognativetest + LINK_LIBRARIES Qt5::Gui Qt5::Test Qt5::Qml Qt5::Quick KF5::WindowSystem KF5::Plasma KF5::PlasmaQuick + ) endif() -set(coronatest_srcs coronatest.cpp) -qt_add_resources(coronatest_srcs coronatestresources.qrc) -ecm_add_test(${coronatest_srcs} TEST_NAME coronatest LINK_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Test KF5::Plasma KF5::CoreAddons KF5::XmlGui) +ecm_add_test( + coronatest.cpp + coronatestresources.qrc + TEST_NAME coronatest + LINK_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Test KF5::Plasma KF5::CoreAddons KF5::XmlGui +) -set(sortfiltermodeltest_srcs +ecm_add_test( sortfiltermodeltest.cpp ../src/declarativeimports/core/datamodel.cpp ../src/declarativeimports/core/datasource.cpp - ) -ecm_add_test(${sortfiltermodeltest_srcs} TEST_NAME plasma-sortfiltermodeltest LINK_LIBRARIES KF5::Plasma Qt5::Gui Qt5::Test KF5::I18n KF5::Service Qt5::Qml) + TEST_NAME plasma-sortfiltermodeltest + LINK_LIBRARIES KF5::Plasma Qt5::Gui Qt5::Test KF5::I18n KF5::Service Qt5::Qml +) #Add a test that i18n is not used directly in any import.