Skip to content

Commit

Permalink
CMake: Bump almost all cmake_minimum_required calls to 3.16
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
alcroito committed Sep 22, 2021
1 parent fb9cc52 commit 0da123d
Show file tree
Hide file tree
Showing 65 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion cmake/QtWriteArgsFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/tests/features/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12.0)
cmake_minimum_required(VERSION 3.16)

project(FeaturesTest
VERSION 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion cmake/tests/qt_make_output_file/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12.0)
cmake_minimum_required(VERSION 3.16)

project(QtMakeOutputFileTest
VERSION 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion config.tests/arch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config.tests/precompile_header/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config.tests/separate_debug_info/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config.tests/static_link_order/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion config.tests/x86_simd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/corelib/Qt6CTestMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/network/doc/snippets/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1.0)
cmake_minimum_required(VERSION 3.16)

project(network_cppsnippets)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/mockplugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project("test(needsquoting)dirname")

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_QFINDTESTDATA)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_add_big_resource/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_add_big_resource)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_add_binary_resources_delayed_file)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_add_resource_options/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_add_resource_options)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_add_resources_binary_generated)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_add_resources_delayed_file)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_concurrent_module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_concurrent_module)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_dbus_module/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_dbus_module)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_dependent_modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_dependent_modules)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)

include(.cmake.conf)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_global_promotion/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(global_promotion)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_import_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.16)

project(import_plugins_advanced)
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_interface)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_interface/widget_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_interface_try_compile)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_interface_link_libraries)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_json_plugin_includes)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_moc_macro_target)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_multiple_find_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_multiple_find_package)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_opengl_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_opengl_lib)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_platform_defs_include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_platform_defs_include)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_plugin_flavor)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_plugins)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_private_includes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_private_includes)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_private_targets/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_private_targets)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_qtmainwin_library)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_static_resources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.16)

include(.cmake.conf)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_testlib_definitions)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(no_link_gui)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(no_link_widgets)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_umbrella_config/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_umbrella_config)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_versionless_targets/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(versionless_targets)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_wrap_cpp_and_resources)

Expand Down
2 changes: 1 addition & 1 deletion tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(test_wrap_cpp_options)

Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Loading

0 comments on commit 0da123d

Please sign in to comment.