Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
3859f15ec9fd333089e6eb1152a76592cd5f83c0
Description
Currently to build Qt we require CMake 3.18.
CMake 3.19 is now out which introduces new CMake policies. These policies default to OLD behaviour when building Qt with version 3.19+. Unless we bump the cmake_minimum_required() calls to 3.19+, but that is very unlikely for now.
Sometime these policies issue scary warnings when building Qt, which we would like to avoid.
At the moment, we get such warnings for CMP0112 (with --trace-redirect) and CMP0116.
We need to find a way how to call cmake_policy(CMPXXX NEW) when building all Qt repos.
Preferably without being forced to copy-paste the lines in each repo separately.
This proves to be difficult because CMake has a concept of policy scopes.
These scopes have very strange (and inconvenient for us) semantics, where a new policy scope is created for each include() and find_package() call. Also functions and macros record their policy scopes at creation time, and somehow bubble up the policy values to the callee higher in the scope tree.
The end result is that it proves to be difficult to propagate new policy scopes via find_package(Qt6 COMPONENTS BuildInternals).
Investigate what's the best way to solve this.
Attachments
Issue Links
- is required for
-
QTBUG-88480 uninformative error message on missing cmake_minimum_required in user projects
- Closed
- relates to
-
QTBUG-88086 Add check for the minimum required CMake version to build Qt 6
- Closed