From 0e56dd2746a8d19d81f71241d6be55e1c94ab037 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 29 Jun 2023 17:37:51 +0200 Subject: [PATCH] CMake: Make qtbase tests standalone projects Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982 Reviewed-by: Joerg Bornemann Reviewed-by: Amir Masoud Abdol --- tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt | 6 ++++++ .../qtconcurrentfiltermapgenerated/CMakeLists.txt | 6 ++++++ .../concurrent/qtconcurrentiteratekernel/CMakeLists.txt | 6 ++++++ tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt | 6 ++++++ tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt | 6 ++++++ tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt | 6 ++++++ tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt | 6 ++++++ .../auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbuscontext/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusinterface/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusmarshall/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusmetaobject/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusmetatype/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbuspendingcall/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbuspendingreply/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusreply/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusthreading/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbustype/CMakeLists.txt | 6 ++++++ tests/auto/dbus/qdbusxmlparser/CMakeLists.txt | 6 ++++++ tests/auto/other/gestures/CMakeLists.txt | 6 ++++++ tests/auto/other/languagechange/CMakeLists.txt | 6 ++++++ tests/auto/other/macgui/CMakeLists.txt | 6 ++++++ tests/auto/other/macnativeevents/CMakeLists.txt | 6 ++++++ tests/auto/other/macplist/CMakeLists.txt | 6 ++++++ tests/auto/other/networkselftest/CMakeLists.txt | 6 ++++++ tests/auto/other/qaccessibility/CMakeLists.txt | 6 ++++++ tests/auto/other/qaccessibilitylinux/CMakeLists.txt | 6 ++++++ tests/auto/other/qaccessibilitymac/CMakeLists.txt | 6 ++++++ tests/auto/other/qcomplextext/CMakeLists.txt | 6 ++++++ tests/auto/other/qfocusevent/CMakeLists.txt | 6 ++++++ .../CMakeLists.txt | 6 ++++++ tests/auto/other/qobjectrace/CMakeLists.txt | 6 ++++++ tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt | 6 ++++++ tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt | 6 ++++++ tests/auto/other/toolsupport/CMakeLists.txt | 6 ++++++ tests/auto/other/xkbkeyboard/CMakeLists.txt | 6 ++++++ .../dialogs/qabstractprintdialog/CMakeLists.txt | 6 ++++++ tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt | 6 ++++++ tests/auto/printsupport/kernel/qprinter/CMakeLists.txt | 6 ++++++ tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsql/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqldriver/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlerror/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlfield/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlindex/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlquery/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlresult/CMakeLists.txt | 6 ++++++ tests/auto/sql/kernel/qsqlthread/CMakeLists.txt | 6 ++++++ tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt | 6 ++++++ tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt | 6 ++++++ .../auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt | 6 ++++++ tests/auto/sql/models/qsqltablemodel/CMakeLists.txt | 6 ++++++ tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt | 6 ++++++ tests/auto/testlib/qsignalspy/CMakeLists.txt | 6 ++++++ tests/auto/testlib/selftests/CMakeLists.txt | 6 ++++++ tests/auto/testlib/tostring/CMakeLists.txt | 6 ++++++ tests/auto/tools/macdeployqt/CMakeLists.txt | 6 ++++++ tests/auto/tools/moc/CMakeLists.txt | 5 +++++ tests/auto/tools/qdbuscpp2xml/CMakeLists.txt | 6 ++++++ tests/auto/tools/qdbusxml2cpp/CMakeLists.txt | 6 ++++++ tests/auto/tools/qmake/CMakeLists.txt | 6 ++++++ tests/auto/tools/qmakelib/CMakeLists.txt | 6 ++++++ tests/auto/tools/qt_cmake_create/CMakeLists.txt | 6 ++++++ tests/auto/tools/rcc/CMakeLists.txt | 6 ++++++ tests/auto/tools/uic/CMakeLists.txt | 6 ++++++ tests/auto/tools/windeployqt/CMakeLists.txt | 6 ++++++ tests/auto/wasm/CMakeLists.txt | 6 ++++++ tests/auto/xml/dom/qdom/CMakeLists.txt | 6 ++++++ 81 files changed, 485 insertions(+) diff --git a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt index a7da94d018f..3c00393d396 100644 --- a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentfilter Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentfilter LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentfilter SOURCES tst_qtconcurrentfilter.cpp diff --git a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt index 938dbb418c4..12545702ebd 100644 --- a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentfiltermapgenerated Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentfiltermapgenerated LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentfiltermapgenerated SOURCES tst_qtconcurrent_selected_tests.cpp diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt index 02f1db9ce80..2eea340795b 100644 --- a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentiteratekernel Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentiteratekernel LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentiteratekernel SOURCES tst_qtconcurrentiteratekernel.cpp diff --git a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt index 20a3a1b9a78..62b434a25f7 100644 --- a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentmap Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentmap LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentmap SOURCES tst_qtconcurrentmap.cpp diff --git a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt index 2a1523e28e5..63f01354672 100644 --- a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentmedian Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentmedian LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentmedian SOURCES tst_qtconcurrentmedian.cpp diff --git a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt index d199df7e115..a8b67925705 100644 --- a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentrun Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentrun LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentrun SOURCES tst_qtconcurrentrun.cpp diff --git a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt index 21f56256063..89226eaacc3 100644 --- a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrenttask Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrenttask LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrenttask SOURCES tst_qtconcurrenttask.cpp diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt index c2f067c3ffc..c3c8c9ea59d 100644 --- a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt +++ b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qtconcurrentthreadengine Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qtconcurrentthreadengine LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qtconcurrentthreadengine SOURCES tst_qtconcurrentthreadengine.cpp diff --git a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt index 3f4c8293acb..01cc7613ff9 100644 --- a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt +++ b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusabstractadaptor LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + add_subdirectory(qmyserver) qt_internal_add_test(tst_qdbusabstractadaptor diff --git a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt index a4bb826984f..4010ae5682e 100644 --- a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt +++ b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusabstractinterface LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusabstractinterface SOURCES interface.cpp diff --git a/tests/auto/dbus/qdbusconnection/CMakeLists.txt b/tests/auto/dbus/qdbusconnection/CMakeLists.txt index 6b42f59045f..f7b526a0cf9 100644 --- a/tests/auto/dbus/qdbusconnection/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection SOURCES tst_qdbusconnection.cpp tst_qdbusconnection.h diff --git a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt index bec59744237..d25c57f37f6 100644 --- a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_delayed Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_delayed LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_delayed SOURCES tst_qdbusconnection_delayed.cpp diff --git a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt index def3f442ce2..3368ce33f0f 100644 --- a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_no_app Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_no_app LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_no_app SOURCES ../qdbusconnection/tst_qdbusconnection.h diff --git a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt index c7e6eec27ee..d6954e4c4bf 100644 --- a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_no_bus Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_no_bus LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_no_bus SOURCES tst_qdbusconnection_no_bus.cpp diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt index 4cbb1eb50ce..879572f3bdf 100644 --- a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_no_libdbus Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_no_libdbus LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_no_libdbus SOURCES ../qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp diff --git a/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt index 32dda2f3f3a..182007da92d 100644 --- a/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_signalorder/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_signalorder Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_signalorder LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_signalorder SOURCES tst_qdbusconnection_signalorder.cpp diff --git a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt index aad667e8728..80417296a0d 100644 --- a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt +++ b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusconnection_spyhook Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusconnection_spyhook LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusconnection_spyhook SOURCES ../qdbusconnection/tst_qdbusconnection.h diff --git a/tests/auto/dbus/qdbuscontext/CMakeLists.txt b/tests/auto/dbus/qdbuscontext/CMakeLists.txt index fd7176e5387..28bb3ebbc7e 100644 --- a/tests/auto/dbus/qdbuscontext/CMakeLists.txt +++ b/tests/auto/dbus/qdbuscontext/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbuscontext Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuscontext LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbuscontext SOURCES tst_qdbuscontext.cpp diff --git a/tests/auto/dbus/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/CMakeLists.txt index 98ec5cb17b2..56439f9ef6a 100644 --- a/tests/auto/dbus/qdbusinterface/CMakeLists.txt +++ b/tests/auto/dbus/qdbusinterface/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusinterface LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + add_subdirectory(qmyserver) ##################################################################### diff --git a/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt index c2df7569c09..bf1ee7953ff 100644 --- a/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt +++ b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbuslocalcalls Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuslocalcalls LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbuslocalcalls SOURCES tst_qdbuslocalcalls.cpp diff --git a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt index 45b2bd81369..db243900698 100644 --- a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt +++ b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusmarshall LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT QT_FEATURE_private_tests) return() endif() diff --git a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt index e7d97a09096..2107d334e02 100644 --- a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt +++ b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusmetaobject Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusmetaobject LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusmetaobject SOURCES tst_qdbusmetaobject.cpp diff --git a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt index 93ea98a704f..5a1ba189fca 100644 --- a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt +++ b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusmetatype Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusmetatype LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusmetatype SOURCES tst_qdbusmetatype.cpp diff --git a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt index 49a9464372f..4493d2364f2 100644 --- a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt +++ b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbuspendingcall Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuspendingcall LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbuspendingcall SOURCES tst_qdbuspendingcall.cpp diff --git a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt index fce3ca46975..52e11b3dbd9 100644 --- a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt +++ b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbuspendingreply Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuspendingreply LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbuspendingreply SOURCES tst_qdbuspendingreply.cpp diff --git a/tests/auto/dbus/qdbusreply/CMakeLists.txt b/tests/auto/dbus/qdbusreply/CMakeLists.txt index 167755a0b18..6427d92d7c6 100644 --- a/tests/auto/dbus/qdbusreply/CMakeLists.txt +++ b/tests/auto/dbus/qdbusreply/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusreply Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusreply LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusreply SOURCES tst_qdbusreply.cpp diff --git a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt index 99c07b0226a..48144cd3535 100644 --- a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt +++ b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusservicewatcher Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusservicewatcher LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusservicewatcher SOURCES tst_qdbusservicewatcher.cpp diff --git a/tests/auto/dbus/qdbusthreading/CMakeLists.txt b/tests/auto/dbus/qdbusthreading/CMakeLists.txt index 831220d70e4..807e401a02a 100644 --- a/tests/auto/dbus/qdbusthreading/CMakeLists.txt +++ b/tests/auto/dbus/qdbusthreading/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusthreading Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusthreading LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusthreading SOURCES tst_qdbusthreading.cpp diff --git a/tests/auto/dbus/qdbustype/CMakeLists.txt b/tests/auto/dbus/qdbustype/CMakeLists.txt index f66a053acb5..1a4e75f61aa 100644 --- a/tests/auto/dbus/qdbustype/CMakeLists.txt +++ b/tests/auto/dbus/qdbustype/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbustype Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbustype LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbustype SOURCES tst_qdbustype.cpp diff --git a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt index bf777c42279..6d924432138 100644 --- a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt +++ b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusxmlparser Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusxmlparser LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusxmlparser SOURCES tst_qdbusxmlparser.cpp diff --git a/tests/auto/other/gestures/CMakeLists.txt b/tests/auto/other/gestures/CMakeLists.txt index 565ee194382..815846305a1 100644 --- a/tests/auto/other/gestures/CMakeLists.txt +++ b/tests/auto/other/gestures/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_gestures Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_gestures LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_gestures SOURCES tst_gestures.cpp diff --git a/tests/auto/other/languagechange/CMakeLists.txt b/tests/auto/other/languagechange/CMakeLists.txt index af81580bbf5..07f3547d585 100644 --- a/tests/auto/other/languagechange/CMakeLists.txt +++ b/tests/auto/other/languagechange/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_languagechange Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_languagechange LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_languagechange SOURCES tst_languagechange.cpp diff --git a/tests/auto/other/macgui/CMakeLists.txt b/tests/auto/other/macgui/CMakeLists.txt index 3344c2accd2..9fb51b40b6c 100644 --- a/tests/auto/other/macgui/CMakeLists.txt +++ b/tests/auto/other/macgui/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macgui LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT APPLE) return() endif() diff --git a/tests/auto/other/macnativeevents/CMakeLists.txt b/tests/auto/other/macnativeevents/CMakeLists.txt index 830ba618f9d..c44cf619202 100644 --- a/tests/auto/other/macnativeevents/CMakeLists.txt +++ b/tests/auto/other/macnativeevents/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macnativeevents LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT APPLE) return() endif() diff --git a/tests/auto/other/macplist/CMakeLists.txt b/tests/auto/other/macplist/CMakeLists.txt index daac225d31c..6a98d4dc16b 100644 --- a/tests/auto/other/macplist/CMakeLists.txt +++ b/tests/auto/other/macplist/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macplist LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT TARGET Qt::Widgets) return() endif() diff --git a/tests/auto/other/networkselftest/CMakeLists.txt b/tests/auto/other/networkselftest/CMakeLists.txt index f0fb3c2e6ec..6491c510f6c 100644 --- a/tests/auto/other/networkselftest/CMakeLists.txt +++ b/tests/auto/other/networkselftest/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_networkselftest Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_networkselftest LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_networkselftest SOURCES tst_networkselftest.cpp diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt index a3372456dbe..9160bafe529 100644 --- a/tests/auto/other/qaccessibility/CMakeLists.txt +++ b/tests/auto/other/qaccessibility/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qaccessibility LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT QT_FEATURE_accessibility) return() endif() diff --git a/tests/auto/other/qaccessibilitylinux/CMakeLists.txt b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt index 445c33e912c..5c85827a3ba 100644 --- a/tests/auto/other/qaccessibilitylinux/CMakeLists.txt +++ b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qaccessibilitylinux LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if (NOT QT_FEATURE_accessibility OR NOT TARGET Qt::LinuxAccessibilitySupportPrivate OR (QT_BUILD_STANDALONE_TESTS AND QT_WILL_INSTALL)) return() diff --git a/tests/auto/other/qaccessibilitymac/CMakeLists.txt b/tests/auto/other/qaccessibilitymac/CMakeLists.txt index 93692c660d1..66896ed384c 100644 --- a/tests/auto/other/qaccessibilitymac/CMakeLists.txt +++ b/tests/auto/other/qaccessibilitymac/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qaccessibilitymac LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + if(NOT APPLE) return() endif() diff --git a/tests/auto/other/qcomplextext/CMakeLists.txt b/tests/auto/other/qcomplextext/CMakeLists.txt index 1e1b6efdec3..74996c7ad7b 100644 --- a/tests/auto/other/qcomplextext/CMakeLists.txt +++ b/tests/auto/other/qcomplextext/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qcomplextext Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qcomplextext LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + # Collect test data list(APPEND test_data "data") diff --git a/tests/auto/other/qfocusevent/CMakeLists.txt b/tests/auto/other/qfocusevent/CMakeLists.txt index 5cde50dd9e7..61682af4e74 100644 --- a/tests/auto/other/qfocusevent/CMakeLists.txt +++ b/tests/auto/other/qfocusevent/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qfocusevent Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qfocusevent LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qfocusevent SOURCES tst_qfocusevent.cpp diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt index 46073647fb7..313d9464a31 100644 --- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt +++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qnetworkaccessmanager_and_qprogressdialog Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qnetworkaccessmanager_and_qprogressdialog LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qnetworkaccessmanager_and_qprogressdialog SOURCES tst_qnetworkaccessmanager_and_qprogressdialog.cpp diff --git a/tests/auto/other/qobjectrace/CMakeLists.txt b/tests/auto/other/qobjectrace/CMakeLists.txt index c5b30d9792b..6516c9ee737 100644 --- a/tests/auto/other/qobjectrace/CMakeLists.txt +++ b/tests/auto/other/qobjectrace/CMakeLists.txt @@ -5,6 +5,12 @@ ## qobjectrace Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qobjectrace LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qobjectrace SOURCES tst_qobjectrace.cpp diff --git a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt index aa899958e48..33836770098 100644 --- a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt +++ b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qprocess_and_guieventloop Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qprocess_and_guieventloop LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qprocess_and_guieventloop SOURCES tst_qprocess_and_guieventloop.cpp diff --git a/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt index bd9ac9e6a2d..a405f541514 100644 --- a/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt +++ b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsharedpointer_and_qwidget Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsharedpointer_and_qwidget LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsharedpointer_and_qwidget SOURCES tst_qsharedpointer_and_qwidget.cpp diff --git a/tests/auto/other/toolsupport/CMakeLists.txt b/tests/auto/other/toolsupport/CMakeLists.txt index 824f25f2609..5b2cc0c0e27 100644 --- a/tests/auto/other/toolsupport/CMakeLists.txt +++ b/tests/auto/other/toolsupport/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_toolsupport Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_toolsupport LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_toolsupport SOURCES tst_toolsupport.cpp diff --git a/tests/auto/other/xkbkeyboard/CMakeLists.txt b/tests/auto/other/xkbkeyboard/CMakeLists.txt index 82a17f3e73a..06e471c68b8 100644 --- a/tests/auto/other/xkbkeyboard/CMakeLists.txt +++ b/tests/auto/other/xkbkeyboard/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_xkbkeyboard Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_xkbkeyboard LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_xkbkeyboard SOURCES tst_xkbkeyboard.cpp diff --git a/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt index f3cfd659282..64a7792d775 100644 --- a/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt +++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qabstractprintdialog Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qabstractprintdialog LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qabstractprintdialog SOURCES tst_qabstractprintdialog.cpp diff --git a/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt index 1ac8a5cb6c4..3df4d6e1352 100644 --- a/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt +++ b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qprintdevice Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qprintdevice LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qprintdevice SOURCES tst_qprintdevice.cpp diff --git a/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt index eac48bd3834..c861a122d9c 100644 --- a/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt +++ b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qprinter Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qprinter LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qprinter SOURCES tst_qprinter.cpp diff --git a/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt index 9d5aa193891..84d0de4d5ed 100644 --- a/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt +++ b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qprinterinfo Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qprinterinfo LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qprinterinfo SOURCES tst_qprinterinfo.cpp diff --git a/tests/auto/sql/kernel/qsql/CMakeLists.txt b/tests/auto/sql/kernel/qsql/CMakeLists.txt index 836e06ce7c1..8e0448a786a 100644 --- a/tests/auto/sql/kernel/qsql/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsql/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsql Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsql LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsql SOURCES tst_qsql.cpp diff --git a/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt index 25e4ff125c8..97dbf94af78 100644 --- a/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqldatabase Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqldatabase LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqldatabase SOURCES tst_qsqldatabase.cpp diff --git a/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt index 04f41409afa..21dd3a64171 100644 --- a/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqldriver Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqldriver LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqldriver SOURCES tst_qsqldriver.cpp diff --git a/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt index a456338a91e..b604399ef11 100644 --- a/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlerror Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlerror LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlerror SOURCES tst_qsqlerror.cpp diff --git a/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt index 9e04209c0a5..2fef2272019 100644 --- a/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlfield Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlfield LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlfield SOURCES tst_qsqlfield.cpp diff --git a/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt b/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt index 6752e9764dd..3373948b5f4 100644 --- a/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlindex/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlindex Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlindex LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlindex SOURCES tst_qsqlindex.cpp diff --git a/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt index a8e28704fd1..e5a5b2b2f82 100644 --- a/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlquery Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlquery LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlquery SOURCES tst_qsqlquery.cpp diff --git a/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt index b648f1eb24f..18d46669db7 100644 --- a/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlrecord Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlrecord LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlrecord SOURCES tst_qsqlrecord.cpp diff --git a/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt index ebb3e255d6e..1fc475b1445 100644 --- a/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlresult Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlresult LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlresult SOURCES testsqldriver.h diff --git a/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt index f18a6e303d4..98108528e6b 100644 --- a/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt +++ b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlthread Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlthread LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlthread SOURCES tst_qsqlthread.cpp diff --git a/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt index 5a6fde19d29..d148ce43e23 100644 --- a/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt +++ b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlquerymodel Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlquerymodel LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlquerymodel SOURCES tst_qsqlquerymodel.cpp diff --git a/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt index f65d3be5dbb..ea2dc6131dd 100644 --- a/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt +++ b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlrelationaldelegate Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlrelationaldelegate LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlrelationaldelegate SOURCES tst_qsqlrelationaldelegate.cpp diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt index accfe0c1fdb..dc85845987b 100644 --- a/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt +++ b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqlrelationaltablemodel Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqlrelationaltablemodel LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqlrelationaltablemodel SOURCES tst_qsqlrelationaltablemodel.cpp diff --git a/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt index f2806e03a6b..15cbe24ef70 100644 --- a/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt +++ b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsqltablemodel Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsqltablemodel LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsqltablemodel SOURCES tst_qsqltablemodel.cpp diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt index 3e302c02e75..680fd3753f9 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt +++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qabstractitemmodeltester Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qabstractitemmodeltester LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qabstractitemmodeltester SOURCES ../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../other/qabstractitemmodelutils/dynamictreemodel.h diff --git a/tests/auto/testlib/qsignalspy/CMakeLists.txt b/tests/auto/testlib/qsignalspy/CMakeLists.txt index 42aff584baa..3c62050de55 100644 --- a/tests/auto/testlib/qsignalspy/CMakeLists.txt +++ b/tests/auto/testlib/qsignalspy/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qsignalspy Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsignalspy LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsignalspy SOURCES tst_qsignalspy.cpp diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt index a6bb30194da..d6fc5ddef32 100644 --- a/tests/auto/testlib/selftests/CMakeLists.txt +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -3,6 +3,12 @@ # The whole file is written manually. +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_selftests LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + include(../../../../src/testlib/selfcover.cmake) # ------------- Test runner ------------- diff --git a/tests/auto/testlib/tostring/CMakeLists.txt b/tests/auto/testlib/tostring/CMakeLists.txt index 57fc65d3526..cb0bdff8473 100644 --- a/tests/auto/testlib/tostring/CMakeLists.txt +++ b/tests/auto/testlib/tostring/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2023 Intel Corporation. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_tostring LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_tostring SOURCES tst_tostring.cpp diff --git a/tests/auto/tools/macdeployqt/CMakeLists.txt b/tests/auto/tools/macdeployqt/CMakeLists.txt index c1c14ae545a..5120b474ae9 100644 --- a/tests/auto/tools/macdeployqt/CMakeLists.txt +++ b/tests/auto/tools/macdeployqt/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_macdeployqt Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macdeployqt LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_macdeployqt SOURCES tst_macdeployqt.cpp diff --git a/tests/auto/tools/moc/CMakeLists.txt b/tests/auto/tools/moc/CMakeLists.txt index 5250bdc8e13..f2a5a1dbe81 100644 --- a/tests/auto/tools/moc/CMakeLists.txt +++ b/tests/auto/tools/moc/CMakeLists.txt @@ -5,6 +5,11 @@ ## tst_moc Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_moc LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() set(JSON_HEADERS backslash-newlines.h diff --git a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt index 256e65e545c..557cf57537a 100644 --- a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt +++ b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbuscpp2xml Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuscpp2xml LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbuscpp2xml SOURCES test1.h diff --git a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt index 6a6fde67e26..29278377b6a 100644 --- a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt +++ b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdbusxml2cpp Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusxml2cpp LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qdbusxml2cpp SOURCES tst_qdbusxml2cpp.cpp diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt index 49e9426b945..8fe0566baa6 100644 --- a/tests/auto/tools/qmake/CMakeLists.txt +++ b/tests/auto/tools/qmake/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qmake LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + # Collect test data file(GLOB_RECURSE test_data_glob RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/tests/auto/tools/qmakelib/CMakeLists.txt b/tests/auto/tools/qmakelib/CMakeLists.txt index a95fd85f1f7..4c6a1e2a721 100644 --- a/tests/auto/tools/qmakelib/CMakeLists.txt +++ b/tests/auto/tools/qmakelib/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qmakelib Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qmakelib LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qmakelib SOURCES ../../../../qmake/library/ioutils.cpp diff --git a/tests/auto/tools/qt_cmake_create/CMakeLists.txt b/tests/auto/tools/qt_cmake_create/CMakeLists.txt index 6611471388d..7d6c49d141f 100644 --- a/tests/auto/tools/qt_cmake_create/CMakeLists.txt +++ b/tests/auto/tools/qt_cmake_create/CMakeLists.txt @@ -1,6 +1,12 @@ # Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qt_cmake_create LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + # Collect test data file(GLOB_RECURSE test_data_glob RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/tests/auto/tools/rcc/CMakeLists.txt b/tests/auto/tools/rcc/CMakeLists.txt index b60fc8b618e..96863c49bd5 100644 --- a/tests/auto/tools/rcc/CMakeLists.txt +++ b/tests/auto/tools/rcc/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_rcc Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_rcc LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_rcc SOURCES tst_rcc.cpp diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt index 42b4a6b0310..2a1d4b51646 100644 --- a/tests/auto/tools/uic/CMakeLists.txt +++ b/tests/auto/tools/uic/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_uic Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_uic LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_uic SOURCES tst_uic.cpp diff --git a/tests/auto/tools/windeployqt/CMakeLists.txt b/tests/auto/tools/windeployqt/CMakeLists.txt index 040696415ec..9ac0051053f 100644 --- a/tests/auto/tools/windeployqt/CMakeLists.txt +++ b/tests/auto/tools/windeployqt/CMakeLists.txt @@ -1,5 +1,11 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_windeployqt LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + add_subdirectory(testapp) add_subdirectory(test) diff --git a/tests/auto/wasm/CMakeLists.txt b/tests/auto/wasm/CMakeLists.txt index 0d67ae8e798..cf2aeb9af26 100644 --- a/tests/auto/wasm/CMakeLists.txt +++ b/tests/auto/wasm/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_wasm Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_localfileapi LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_localfileapi SOURCES tst_localfileapi.cpp diff --git a/tests/auto/xml/dom/qdom/CMakeLists.txt b/tests/auto/xml/dom/qdom/CMakeLists.txt index 29de35f40d5..b08701a6402 100644 --- a/tests/auto/xml/dom/qdom/CMakeLists.txt +++ b/tests/auto/xml/dom/qdom/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qdom Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdom LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + # Collect test data file(GLOB_RECURSE test_data_glob RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}