diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-16 12:20:52 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-17 13:55:21 +0200 |
commit | aab8a0ac6e5365d97d3c7571b26430776b7b5f49 (patch) | |
tree | 84b4743675e3886f9b2646066aed9124ad5282a4 | |
parent | 6a4aa096e9b9af08a81fe020d7f2ec8ceab7dfa6 (diff) |
CMake: Warn when using CMake 3.20.1 due to crashes in AUTOMOC
With CMake 3.20.1 AUTOMOC can crash or hang on Windows when used with
a Qt installation that supports moc depfiles due to missing
multi-threaded locking.
Warn and advise to use a different CMake version instead.
Change-Id: I78d2269c48dfc2541bebcd6ab23aaa5595012149
Pick-to: 6.1 6.0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | cmake/QtCMakeVersionHelpers.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake index 944060d15c..4d4113bb43 100644 --- a/cmake/QtCMakeVersionHelpers.cmake +++ b/cmake/QtCMakeVersionHelpers.cmake @@ -121,6 +121,12 @@ function(qt_internal_warn_about_unsuitable_cmake_versions) # https://gitlab.kitware.com/cmake/cmake/-/issues/21977 list(APPEND unsuitable_versions "3.20.0") + # AUTOMOC can crash or hang when using a Qt that supports moc depfiles. + # Issues reported on Windows with Ninja and Makefiles, but it could be happening + # on other platforms too. + # https://gitlab.kitware.com/cmake/cmake/-/issues/22014 + list(APPEND unsuitable_versions "3.20.1") + foreach(unsuitable_version ${unsuitable_versions}) if(CMAKE_VERSION VERSION_EQUAL unsuitable_version) message(WARNING |