diff options
Diffstat (limited to 'cmake/QtCMakeVersionHelpers.cmake')
-rw-r--r-- | cmake/QtCMakeVersionHelpers.cmake | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/cmake/QtCMakeVersionHelpers.cmake b/cmake/QtCMakeVersionHelpers.cmake index a42e1a523f..322e58eed1 100644 --- a/cmake/QtCMakeVersionHelpers.cmake +++ b/cmake/QtCMakeVersionHelpers.cmake @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Returns the minimum supported CMake version required to /build/ Qt as originally advertised by Qt. function(qt_internal_get_supported_min_cmake_version_for_building_qt out_var) if(NOT DEFINED BUILD_SHARED_LIBS) @@ -11,6 +14,8 @@ function(qt_internal_get_supported_min_cmake_version_for_building_qt out_var) set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT}") # We're building qtbase so the values come from .cmake.conf. + elseif(APPLE) + set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_APPLE}") elseif(BUILD_SHARED_LIBS) set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED}") else() @@ -27,7 +32,9 @@ function(qt_internal_get_supported_min_cmake_version_for_using_qt out_var) "It should have been set by this point.") endif() - if(BUILD_SHARED_LIBS) + if(APPLE) + set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_APPLE}") + elseif(BUILD_SHARED_LIBS) set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_SHARED}") else() set(supported_version "${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC}") @@ -189,6 +196,12 @@ function(qt_internal_warn_about_buggy_cmake_versions) # https://gitlab.kitware.com/cmake/cmake/-/issues/16776 list(APPEND unsuitable_versions "3.21.0") + # Changing a C++ source file can trigger rebuilds of a lot of other source files that might + # include AUTOGEN'ed headers or sources. + # https://gitlab.kitware.com/cmake/cmake/-/issues/22531 + # Fixed in 3.21.2. + list(APPEND unsuitable_versions "3.21.1") + foreach(unsuitable_version ${unsuitable_versions}) if(CMAKE_VERSION VERSION_EQUAL unsuitable_version) message(WARNING |