aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-07-07 13:54:11 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-07-08 08:49:19 +0200
commitc971db7e5b9b28e18170612dd4b84aeb43f337f7 (patch)
tree409a44667455ce007e5212862ca180f53fe463a6 /CMakeLists.txt
parent497bd051e46fe147efddad438b3c4fe724652bd3 (diff)
CMake: Don't load QtAutoDetect for top-level standalone tests
We don't load it for qtbase standalone tests, we shouldn't for top-level builds as well. This brings us one step closer to fixing top-level standalone tests. Pick-to: 6.5 6.6 Change-Id: I7c2710e61951f6789fea63422bc575a1ac611cdc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 44969693..115ba2c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,12 @@ include("${__qt6_qtbase_src_path}/.cmake.conf")
# Run platform auto-detection /before/ the first project() call and thus
# before the toolchain file is loaded.
-include("${__qt6_qtbase_src_path}/cmake/QtAutoDetect.cmake")
+# Don't run auto-detection when doing standalone tests. In that case, the detection
+# results are taken from either QtBuildInternals or the qt.toolchain.cmake file.
+
+if(NOT QT_BUILD_STANDALONE_TESTS)
+ include("${__qt6_qtbase_src_path}/cmake/QtAutoDetect.cmake")
+endif()
project(Qt
VERSION "${QT_REPO_MODULE_VERSION}"