fix: support CMake 3.27, drop 3.4 (#4719)

* fix: support CMake 3.27, drop 3.4

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Update upgrade.rst

* Update upgrade.rst

* Update upgrade.rst

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2023-07-12 13:10:24 -05:00
committed by GitHub
parent 6d22dba82f
commit 2e5f5c4cf8
16 changed files with 75 additions and 49 deletions

View File

@@ -5,20 +5,17 @@
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.5)
# The `cmake_minimum_required(VERSION 3.4...3.18)` syntax does not work with
# The `cmake_minimum_required(VERSION 3.5...3.26)` syntax does not work with
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
# the behavior using the following workaround:
if(${CMAKE_VERSION} VERSION_LESS 3.21)
if(${CMAKE_VERSION} VERSION_LESS 3.26)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.21)
cmake_policy(VERSION 3.26)
endif()
# Only needed for CMake < 3.5 support
include(CMakeParseArguments)
# Filter out items; print an optional message if any items filtered. This ignores extensions.
#
# Usage: