diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-16 12:20:52 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-17 21:34:34 +0000 |
commit | edf4e34797e7a31ac8318784270224d6aeb7a2af (patch) | |
tree | 6123b9451c2fba9ced63b64af19e07e8c352071c /cmake | |
parent | a3f75608f0e8339ae2a6ca4b34955d69fdbacc84 (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
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit aab8a0ac6e5365d97d3c7571b26430776b7b5f49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-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 |