aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-07-07 13:54:11 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-07-10 08:07:15 +0000
commit152b5beb8c3413386c6aaf29c771ac39bb4f2dee (patch)
tree8346abc5e2b53715b1fa63709cc240f1c2c80945 /CMakeLists.txt
parent839385fc1e12d7c178b7fba4e63edc4393821984 (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. Change-Id: I7c2710e61951f6789fea63422bc575a1ac611cdc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit c971db7e5b9b28e18170612dd4b84aeb43f337f7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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}"