diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e61fdfa48..ae1a9076cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,11 @@ -# Minimum CMake required -cmake_minimum_required(VERSION 3.10) +# Minimum CMake required. If available, accept the policy-controlled behavior up +# to 3.26. +cmake_minimum_required(VERSION 3.10...3.26) if(protobuf_VERBOSE) message(STATUS "Protocol Buffers Configuring...") endif() -# MSVC runtime library flags are selected by an abstraction. -# New in CMake 3.15: https://cmake.org/cmake/help/latest/policy/CMP0091.html -if(POLICY CMP0091) - cmake_policy(SET CMP0091 NEW) -endif() - -# option() honors normal variables -# New in CMake 3.13: https://cmake.org/cmake/help/latest/policy/CMP0077.html -if (POLICY CMP0077) - cmake_policy(SET CMP0077 NEW) -endif (POLICY CMP0077) - # Project project(protobuf C CXX)