mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-02 20:51:36 +00:00
feat: require CMake 3.15+ (#5304)
* feat: require CMake 3.15+ Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Apply suggestions from code review * Update CMakeLists.txt * fix: adapt for CMake 3.30+ (using 3.18+) Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(test_installed_module CXX)
|
||||
|
||||
# The `cmake_minimum_required(VERSION 3.5...3.29)` 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.29)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
else()
|
||||
cmake_policy(VERSION 3.29)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.15...3.30)
|
||||
|
||||
project(test_installed_function CXX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user