Author: ivan Date: Mon Jul 27 13:23:51 2026 New Revision: 1936635 Log: cmake: Bump minimum required version of CMake 3.14 → 3.20.
Discussion: https://lists.apache.org/thread/2j9p8o97knd9loxoj1xgz58y6dq8dok4 * CMakeLists.txt (cmake_minimum_required): Bump to 3.20. (): No longer manually set CMP0091 and CMP0092 to NEW. CMake 3.20+ sets them to NEW automatically. (): Remove workaround for Intl::Intl target for CMake version < 3.20. (): Remove workaround for find_package(Python3) for CMake version < 3.18. (): Remove workaround for Ruby_INCLUDE_DIRS for CMake version < 3.18. Modified: subversion/trunk/CMakeLists.txt Modified: subversion/trunk/CMakeLists.txt ============================================================================== --- subversion/trunk/CMakeLists.txt Mon Jul 27 12:49:53 2026 (r1936634) +++ subversion/trunk/CMakeLists.txt Mon Jul 27 13:23:51 2026 (r1936635) @@ -37,18 +37,7 @@ # - RHEL 8 (supported until May 2029): CMake 3.26 # - RHEL 9 (supported until May 2032): CMake 3.31 # - RHEL 10 (supported until May 2035): CMake 3.31 -cmake_minimum_required(VERSION 3.14) - -# CMP0092: MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default. -if(POLICY CMP0092) - cmake_policy(SET CMP0092 NEW) -endif() - -# Enable support for MSVC runtime library selection by abstraction -# if supported by CMake. -if(POLICY CMP0091) - cmake_policy(SET CMP0091 NEW) -endif() +cmake_minimum_required(VERSION 3.20) function(read_version path var major minor patch) get_filename_component(path ${path} ABSOLUTE) @@ -504,16 +493,6 @@ if(SVN_ENABLE_NLS) find_package(Gettext REQUIRED) find_package(Intl REQUIRED) - # If using CMake of version < 3.20, FindIntl would not define IMPORTED target. - # https://cmake.org/cmake/help/latest/module/FindIntl.html - if(NOT TARGET Intl::Intl) - add_library(Intl::Intl INTERFACE IMPORTED) - include_directories("${Intl_INCLUDE_DIRS}") - set_target_properties(Intl::Intl PROPERTIES - INTERFACE_LINK_LIBRARIES "${Intl_LIBRARIES}" - ) - endif() - svn_create_alias_target(external-intl Intl::Intl) add_private_config_definition( @@ -771,11 +750,7 @@ endif() ### Python if(SVN_ENABLE_SWIG_PYTHON) - if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") - find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) - else() - find_package(Python3 REQUIRED COMPONENTS Interpreter Development) - endif() + find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) elseif(SVN_ENABLE_TESTS) find_package(Python3 REQUIRED COMPONENTS Interpreter @@ -1081,9 +1056,6 @@ if(SVN_ENABLE_SWIG_RUBY) find_package(Ruby REQUIRED) add_library(external-ruby IMPORTED INTERFACE) - if(NOT DEFINED Ruby_INCLUDE_DIRS) # < 3.18 - set(Ruby_INCLUDE_DIRS ${RUBY_INCLUDE_DIRS}) - endif() target_include_directories(external-ruby INTERFACE ${Ruby_INCLUDE_DIRS} ${SWIG_INCLUDE_DIRECTORIES}
