summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-06-29 17:37:51 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-05 15:09:32 +0200
commit0e56dd2746a8d19d81f71241d6be55e1c94ab037 (patch)
treea74c01bec7b9958059e980409fb2bdc46b08fc0f /tests/auto/other
parent463d232457834d91e3b6567e52b7f3a18d679541 (diff)
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 <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/gestures/CMakeLists.txt6
-rw-r--r--tests/auto/other/languagechange/CMakeLists.txt6
-rw-r--r--tests/auto/other/macgui/CMakeLists.txt6
-rw-r--r--tests/auto/other/macnativeevents/CMakeLists.txt6
-rw-r--r--tests/auto/other/macplist/CMakeLists.txt6
-rw-r--r--tests/auto/other/networkselftest/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibilitylinux/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibilitymac/CMakeLists.txt6
-rw-r--r--tests/auto/other/qcomplextext/CMakeLists.txt6
-rw-r--r--tests/auto/other/qfocusevent/CMakeLists.txt6
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt6
-rw-r--r--tests/auto/other/qobjectrace/CMakeLists.txt6
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt6
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt6
-rw-r--r--tests/auto/other/toolsupport/CMakeLists.txt6
-rw-r--r--tests/auto/other/xkbkeyboard/CMakeLists.txt6
17 files changed, 102 insertions, 0 deletions
diff --git a/tests/auto/other/gestures/CMakeLists.txt b/tests/auto/other/gestures/CMakeLists.txt
index 565ee19438..815846305a 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 af81580bbf..07f3547d58 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 3344c2accd..9fb51b40b6 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 830ba618f9..c44cf61920 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 daac225d31..6a98d4dc16 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 f0fb3c2e6e..6491c510f6 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 a3372456db..9160bafe52 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 445c33e912..5c85827a3b 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 93692c660d..66896ed384 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 1e1b6efdec..74996c7ad7 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 5cde50dd9e..61682af4e7 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 46073647fb..313d9464a3 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 c5b30d9792..6516c9ee73 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 aa899958e4..3383677009 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 bd9ac9e6a2..a405f54151 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 824f25f260..5b2cc0c0e2 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 82a17f3e73..06e471c68b 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