summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-06-28 19:00:50 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-05 15:09:32 +0200
commitd4b7acec4ba6f32de10ab158e3177bb98781ab3d (patch)
treebda521d4abdfeef9ad69acf486fbbc19c62aeee4 /tests/auto/corelib/global
parentd45ac7b898663f3d29e8f122eb8a68108981a042 (diff)
CMake: Make corelib 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: I28b6d3815c5f43d2c33ea65764f6f3f8f129eaf3 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/global')
-rw-r--r--tests/auto/corelib/global/q20/memory/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/q_func_info/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qcompare/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qflags/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qgetputenv/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qglobal/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qglobalstatic/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qhooks/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qkeycombination/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qnativeinterface/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qnumeric/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qtendian/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt6
17 files changed, 102 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/q20/memory/CMakeLists.txt b/tests/auto/corelib/global/q20/memory/CMakeLists.txt
index f928f75b7a..f36ff0f592 100644
--- a/tests/auto/corelib/global/q20/memory/CMakeLists.txt
+++ b/tests/auto/corelib/global/q20/memory/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_q20_memory LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_q20_memory
EXCEPTIONS
SOURCES
diff --git a/tests/auto/corelib/global/q_func_info/CMakeLists.txt b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
index 98f8afad15..88119484cd 100644
--- a/tests/auto/corelib/global/q_func_info/CMakeLists.txt
+++ b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_q_func_info Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_q_func_info LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_q_func_info
SOURCES
tst_q_func_info.cpp
diff --git a/tests/auto/corelib/global/qcompare/CMakeLists.txt b/tests/auto/corelib/global/qcompare/CMakeLists.txt
index 1e0971ebcd..b29dcae618 100644
--- a/tests/auto/corelib/global/qcompare/CMakeLists.txt
+++ b/tests/auto/corelib/global/qcompare/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qcompare Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qcompare LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qcompare
SOURCES
tst_qcompare.cpp
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt
index 54853bf792..8b01ea774f 100644
--- a/tests/auto/corelib/global/qflags/CMakeLists.txt
+++ b/tests/auto/corelib/global/qflags/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qflags Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qflags LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qflags
SOURCES
tst_qflags.cpp
diff --git a/tests/auto/corelib/global/qfloat16/CMakeLists.txt b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
index 1ab6ecae71..f6ca52b0df 100644
--- a/tests/auto/corelib/global/qfloat16/CMakeLists.txt
+++ b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qfloat16 Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qfloat16 LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qfloat16
SOURCES
tst_qfloat16.cpp
diff --git a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
index f6f18b1ab7..f1a5cbeef3 100644
--- a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
+++ b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qgetputenv Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qgetputenv LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qgetputenv
SOURCES
tst_qgetputenv.cpp
diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt
index aded9e8c9f..ec078c93d8 100644
--- a/tests/auto/corelib/global/qglobal/CMakeLists.txt
+++ b/tests/auto/corelib/global/qglobal/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qglobal Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qglobal LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qglobal
SOURCES
qglobal.c
diff --git a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
index 0d09598e79..6707e46dff 100644
--- a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
+++ b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qglobalstatic Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qglobalstatic LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qglobalstatic
EXCEPTIONS
SOURCES
diff --git a/tests/auto/corelib/global/qhooks/CMakeLists.txt b/tests/auto/corelib/global/qhooks/CMakeLists.txt
index 71812c4c53..2d2051015f 100644
--- a/tests/auto/corelib/global/qhooks/CMakeLists.txt
+++ b/tests/auto/corelib/global/qhooks/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qhooks Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qhooks LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qhooks
SOURCES
tst_qhooks.cpp
diff --git a/tests/auto/corelib/global/qkeycombination/CMakeLists.txt b/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
index a49ecd1709..0b1d519e4f 100644
--- a/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
+++ b/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qkeycombination Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qkeycombination LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qkeycombination
SOURCES
tst_qkeycombination.cpp
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index c540977464..b3c66aeb2e 100644
--- a/tests/auto/corelib/global/qlogging/CMakeLists.txt
+++ b/tests/auto/corelib/global/qlogging/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_qlogging LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_executable(qlogging_helper
NO_INSTALL
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
diff --git a/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt b/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt
index bf41effc42..2c87e07b21 100644
--- a/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt
+++ b/tests/auto/corelib/global/qnativeinterface/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_qnativeinterface LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qnativeinterface
SOURCES
tst_qnativeinterface.cpp
diff --git a/tests/auto/corelib/global/qnumeric/CMakeLists.txt b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
index adb467c778..e53a096c92 100644
--- a/tests/auto/corelib/global/qnumeric/CMakeLists.txt
+++ b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qnumeric Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qnumeric LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qnumeric
SOURCES
tst_qnumeric.cpp
diff --git a/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt b/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
index 00e5ac0f02..f0e682d664 100644
--- a/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
+++ b/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qoperatingsystemversion Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qoperatingsystemversion LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qoperatingsystemversion
SOURCES
tst_qoperatingsystemversion.cpp
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
index b9468caabb..3d8f892414 100644
--- a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
+++ b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qrandomgenerator Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qrandomgenerator LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qrandomgenerator
SOURCES
tst_qrandomgenerator.cpp
diff --git a/tests/auto/corelib/global/qtendian/CMakeLists.txt b/tests/auto/corelib/global/qtendian/CMakeLists.txt
index d3e91450ce..cf1a22f678 100644
--- a/tests/auto/corelib/global/qtendian/CMakeLists.txt
+++ b/tests/auto/corelib/global/qtendian/CMakeLists.txt
@@ -5,6 +5,12 @@
## tst_qtendian Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qtendian LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qtendian
SOURCES
tst_qtendian.cpp
diff --git a/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt b/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
index d52618d527..351fe24b22 100644
--- a/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
+++ b/tests/auto/corelib/global/qxp/function_ref/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_qxp_function_ref LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qxp_function_ref
EXCEPTIONS
SOURCES