diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-10-09 11:48:23 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-10-12 13:57:41 +0200 |
commit | 7643295c12f1577c9770ff707c85fc6738ccf62b (patch) | |
tree | f6a8b5f92bbc35b6b8ce334ab9ba19935968d45e /CMakeLists.txt | |
parent | 605bbe2011f99f4a9036cbd41cd5a05fd3108070 (diff) |
CMake: Do not run auto-detection in top-level builds
The top-level CMakeLists.txt already does that to ensure that
QtAutoDetect is included before any project command, meaning before any
toolchain file is loaded.
Task-number: QTBUG-87309
Change-Id: I60a998bdf999b6f751e4ebec2d13491fb206b132
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d0014b5363..322e8a102a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,10 @@ # special case skip regeneration cmake_minimum_required(VERSION 3.15.0) -# Run auto detection routines, but not when doing stnadalone tests. In that case the detection -# results are takend from either QtBuildInternals or the qt.toolchain.cmake file. -if(NOT QT_BUILD_STANDALONE_TESTS) +# Run auto detection routines, but not when doing standalone tests. In that case, the detection +# results are taken from either QtBuildInternals or the qt.toolchain.cmake file. Also, inhibit +# auto-detection in a top-level build, because the top-level project file already includes it. +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_SUPER_BUILD) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtAutoDetect.cmake) endif() |