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:51 +0000 |
commit | 19b70c1caad18c91dac9b3a997bdbf5eeabbdf5e (patch) | |
tree | 79fe5080c3062640ff1ee9ffb2aafddd160d8a01 | |
parent | 315975335816314c849c7d6fa914800d16ff719b (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>
-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 |