diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-10-04 12:20:26 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-04 13:55:24 +0000 |
commit | 8f984c5ee624cb0b6f1b9fdfec8c1f8da8a443ca (patch) | |
tree | 86459e0b4f8a9ab47c303af7815d4e439f52732f /.cmake.conf | |
parent | ee9282ef17150dd31e4046ee85eaf7220ab4d9b3 (diff) |
Revert "CMake: Warn if cmake_minimum_required has an unsupported low version"
This reverts commit 657525965b86cfa135bb5a814a537443163acb14.
The change relied on reading the last value of the
CMAKE_MINIMUM_REQUIRED_VERSION variable before one of the Qt packages
is found to use it for the version check.
Even if a user project has a cmake_minimum_required() right at
the beginning of the project with a supported version specified,
the first project() call which loads a CMake toolchain file could
contain another cmake_minimum_required() call with a lower
(unsupported) version and that version would be used for the check,
failing the project configuration.
The Android NDK ships such a toolchain file, which requires version
'3.6'.
Thus, relying on the last value of CMAKE_MINIMUM_REQUIRED_VERSION is
not robust enough.
Task-number: QTBUG-95018
Task-number: QTBUG-95832
Change-Id: Iff3cb0a46e6e878569dce9c5fe915a714a034904
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 99899dd299eccc0a2133b45a04d80cb0e438f773)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to '.cmake.conf')
-rw-r--r-- | .cmake.conf | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/.cmake.conf b/.cmake.conf index 5afc98ce62..6ffaef2029 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -1,24 +1,16 @@ set(QT_REPO_MODULE_VERSION "6.2.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "") -# Minimum required CMake version for building Qt. +# Minimum requirement for building Qt set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED "3.16") set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_STATIC "3.21") -# Minimum required CMake version for using Qt in a user project. +# Minimum requirement for consuming Qt in a user project. # This might be different in the future, e.g. be lower than the requirement for # building Qt. set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED "3.16") set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC "3.21") -# Minimum CMake version that needs to appear in the cmake_minimum_required() call of a Qt user -# project, so that all policies defined up to the specified CMake version are using NEW behavior. -# With a value of 3.16, all policies CMP0000-CMP0097 will use NEW behavior. -# -# For now, both shared and static Qt builds share the same minimum. -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED_IN_CMAKE_MIN_REQUIRED "3.16") -set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC_IN_CMAKE_MIN_REQUIRED "3.16") - # Policy settings for commands defined by qtbase. These will also be injected # into the top level policy scope of each Qt module when building Qt so that # modules have the same policy settings as qtbase by default. They can be |