CMake: Bump almost all cmake_minimum_required calls to 3.16

Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.

Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
Alexandru Croitor 2021-09-22 15:11:47 +02:00
parent fb9cc52920
commit 0da123d67b
65 changed files with 66 additions and 66 deletions

View File

@ -8,7 +8,7 @@
# SKIP_ARGS: Number of arguments to skip from the front of the arguments list.
# IGNORE_ARGS: List of arguments to be ignored, i.e. that are not written.
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.16)
# Read arguments from IN_FILE and separate them.
file(READ "${IN_FILE}" raw_args)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12.0)
cmake_minimum_required(VERSION 3.16)
project(FeaturesTest
VERSION 1.0.0

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12.0)
cmake_minimum_required(VERSION 3.16)
project(QtMakeOutputFileTest
VERSION 1.0.0

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)
project(arch LANGUAGES CXX)
add_executable(architecture_test)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)
project(precompile_header LANGUAGES CXX)
add_executable(precompile_header main.cpp)

View File

@ -1,5 +1,5 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.14.0)
cmake_minimum_required(VERSION 3.16)
project(objcopytest LANGUAGES CXX)
include(CMakeFindBinUtils)
add_executable(objcopytest main.cpp)

View File

@ -7,7 +7,7 @@
# staticlib2.cpp.o.
#
# For now it's only applicable for ld-like linkers. 'lld' has no such issue.
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(static_link_order_test LANGUAGES CXX)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14.0)
cmake_minimum_required(VERSION 3.16)
project(x86_simd LANGUAGES CXX)
include(../../cmake/QtPlatformSupport.cmake)

View File

@ -372,7 +372,7 @@ list(APPEND CMAKE_PREFIX_PATH \"${CMAKE_PREFIX_PATH}\")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/CMakeLists.txt"
"
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(${_dir})
try_compile(Result \${CMAKE_CURRENT_BINARY_DIR}/${_dir}
@ -446,7 +446,7 @@ function(_qt_internal_test_module_includes)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/module_includes/CMakeLists.txt"
"
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(module_includes)
${packages_string}

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1.0)
cmake_minimum_required(VERSION 3.16)
project(network_cppsnippets)

View File

@ -40,7 +40,7 @@
# needs to be set to the installation prefix or build prefix of Qt
# before running these tests.
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(cmake_usage_tests)

View File

@ -1,6 +1,6 @@
# Generated from qtsvg.pro.
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
project(QtMockPlugins

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project("test(needsquoting)dirname")

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_QFINDTESTDATA)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0099)
cmake_policy(SET CMP0099 NEW) # Avoid CMP0099 related warnings.
endif()

View File

@ -1,6 +1,6 @@
# The test is simply testing that manual specification of QT_TESTCASE_BUILDDIR works,
# despite the weird paths.
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_qt_testcase_builddir)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_add_big_resource)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_add_binary_resources_delayed_file)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_add_resource_options)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_add_resources_binary_generated)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_add_resources_delayed_file)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_concurrent_module)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_dbus_module)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_dependent_modules)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(global_promotion)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.16)
project(import_plugins_advanced)
enable_testing()

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_interface)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_interface_try_compile)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_interface_link_libraries)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_json_plugin_includes)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_moc_macro_target)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_multiple_find_package)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_opengl_lib)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_platform_defs_include)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_plugin_flavor)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_plugins)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_private_includes)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_private_targets)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_qtmainwin_library)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_testlib_definitions)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(no_link_gui)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(no_link_widgets)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_umbrella_config)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(versionless_targets)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_wrap_cpp_and_resources)

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(test_wrap_cpp_options)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(next LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(fromcbor LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(extractionoperator-float LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(readnext LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(optimize LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(fromstring LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(result LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(loadfromdata LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(fromiccprofile LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(sethtml LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(setmarkdown LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(beginlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(pem LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

View File

@ -1,5 +1,5 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(dprgadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

View File

@ -1,5 +1,5 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(pixelgadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

View File

@ -1,5 +1,5 @@
# special case skip regeneration
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)
project(screengadget LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)

View File

@ -4446,7 +4446,7 @@ def write_regular_cmake_target_scope_section(
def handle_config_test_project(scope: Scope, cm_fh: IO[str]):
project_name = os.path.splitext(os.path.basename(scope.file_absolute_path))[0]
content = (
f"cmake_minimum_required(VERSION 3.14.0)\n"
f"cmake_minimum_required(VERSION 3.16)\n"
f"project(config_test_{project_name} LANGUAGES C CXX)\n"
"""
foreach(p ${QT_CONFIG_COMPILE_TEST_PACKAGES})