chore: bump CMake max policy to 4.2 (#5944)

* chore: bupm CMake to 4.1

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

* ci: use newest version of CMake in a few places

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

* chore: bupm CMake to 4.2

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

---------

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
This commit is contained in:
Henry Schreiner
2026-01-15 12:38:45 -05:00
committed by GitHub
parent ca1d996461
commit e44aae2268
13 changed files with 18 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ information, see :doc:`/compiling`.
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example)
find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)`

View File

@@ -18,7 +18,7 @@ A Python extension module can be created with just a few lines of code:
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example LANGUAGES CXX)
set(PYBIND11_FINDPYTHON ON)
@@ -447,7 +447,7 @@ See the `Config file`_ docstring for details of relevant CMake variables.
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example LANGUAGES CXX)
find_package(pybind11 REQUIRED)
@@ -492,7 +492,7 @@ FindPython, pybind11 will detect this and use the existing targets instead:
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example LANGUAGES CXX)
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
@@ -570,7 +570,7 @@ You can use these targets to build complex applications. For example, the
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example LANGUAGES CXX)
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
@@ -628,7 +628,7 @@ information about usage in C++, see :doc:`/advanced/embedding`.
.. code-block:: cmake
cmake_minimum_required(VERSION 3.15...4.0)
cmake_minimum_required(VERSION 3.15...4.2)
project(example LANGUAGES CXX)
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)