aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-08-30 13:13:37 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-02 11:23:38 +0000
commit729addd82ecb30825097961022d189e956a2e2cf (patch)
tree126efc5863e76eac0cfc08fd89d6372492a47ec4 /tests
parentb9a263faec1a0d94b76450a52c5ca07503e7e528 (diff)
Support standalone tests building
Also fix some build issues regarding tests. Change-Id: Ie9ba8a0b7932ae2b542614b6c824c4071ad0b548 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt19
-rw-r--r--tests/benchmarks/qml/qqmlcomponent/CMakeLists.txt2
2 files changed, 10 insertions, 11 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 33a89765dd..eeddbe0780 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,13 +1,12 @@
-# Generated from tests.pro.
-
# special case begin
-find_package(Qt6 REQUIRED Concurrent)
+if(NOT TARGET Qt::Test)
+ cmake_minimum_required(VERSION 3.15.0)
+ project(QtDeclarativeTests VERSION 6.0.0 LANGUAGES C CXX ASM)
+ find_package(Qt6 REQUIRED COMPONENTS BuildInternals Core Test Qml Quick QuickParticles
+ QmlDevTools QuickWidgets QmlDebug QuickTest QuickShapes
+ QmlWorkerScript Concurrent)
+ qt_set_up_standalone_tests_build()
+endif()
# special case end
-add_subdirectory(auto)
-# special case begin
-# benchmarks not yet ported
-# if(QT_CONFIG___contains___release)
-# add_subdirectory(benchmarks)
-# endif()
-# special case end
+qt_build_tests()
diff --git a/tests/benchmarks/qml/qqmlcomponent/CMakeLists.txt b/tests/benchmarks/qml/qqmlcomponent/CMakeLists.txt
index d54f1d09a5..442d405832 100644
--- a/tests/benchmarks/qml/qqmlcomponent/CMakeLists.txt
+++ b/tests/benchmarks/qml/qqmlcomponent/CMakeLists.txt
@@ -4,7 +4,7 @@
## tst_qqmlcomponent Binary:
#####################################################################
-add_qt_executable(tst_qqmlcomponent
+add_qt_executable(tst_qqmlcomponent_benchmark # special case avoid collision with auto test
GUI
SOURCES
testtypes.cpp testtypes.h