mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
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:
4
.github/workflows/configure.yml
vendored
4
.github/workflows/configure.yml
vendored
@@ -39,10 +39,10 @@ jobs:
|
|||||||
cmake: "3.15"
|
cmake: "3.15"
|
||||||
|
|
||||||
- runs-on: macos-14
|
- runs-on: macos-14
|
||||||
cmake: "4.0"
|
cmake: "4.2"
|
||||||
|
|
||||||
- runs-on: windows-latest
|
- runs-on: windows-latest
|
||||||
cmake: "4.0"
|
cmake: "4.2"
|
||||||
|
|
||||||
name: 🐍 3.11 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }}
|
name: 🐍 3.11 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }}
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.27")
|
|||||||
cmake_policy(GET CMP0148 _pybind11_cmp0148)
|
cmake_policy(GET CMP0148 _pybind11_cmp0148)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
if(_pybind11_cmp0148)
|
if(_pybind11_cmp0148)
|
||||||
cmake_policy(SET CMP0148 ${_pybind11_cmp0148})
|
cmake_policy(SET CMP0148 ${_pybind11_cmp0148})
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ information, see :doc:`/compiling`.
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example)
|
project(example)
|
||||||
|
|
||||||
find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)`
|
find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)`
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ A Python extension module can be created with just a few lines of code:
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example LANGUAGES CXX)
|
project(example LANGUAGES CXX)
|
||||||
|
|
||||||
set(PYBIND11_FINDPYTHON ON)
|
set(PYBIND11_FINDPYTHON ON)
|
||||||
@@ -447,7 +447,7 @@ See the `Config file`_ docstring for details of relevant CMake variables.
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example LANGUAGES CXX)
|
project(example LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(pybind11 REQUIRED)
|
find_package(pybind11 REQUIRED)
|
||||||
@@ -492,7 +492,7 @@ FindPython, pybind11 will detect this and use the existing targets instead:
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example LANGUAGES CXX)
|
project(example LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
|
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
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example LANGUAGES CXX)
|
project(example LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
|
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
|
||||||
@@ -628,7 +628,7 @@ information about usage in C++, see :doc:`/advanced/embedding`.
|
|||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
project(example LANGUAGES CXX)
|
project(example LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
|
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# All rights reserved. Use of this source code is governed by a
|
# All rights reserved. Use of this source code is governed by a
|
||||||
# BSD-style license that can be found in the LICENSE file.
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
# Filter out items; print an optional message if any items filtered. This ignores extensions.
|
# Filter out items; print an optional message if any items filtered. This ignores extensions.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_installed_embed CXX)
|
project(test_installed_embed CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_installed_function CXX)
|
project(test_installed_function CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_installed_target CXX)
|
project(test_installed_target CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_subdirectory_embed CXX)
|
project(test_subdirectory_embed CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_subdirectory_function CXX)
|
project(test_subdirectory_function CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
project(test_subdirectory_target CXX)
|
project(test_subdirectory_target CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
function(pybind11_guess_python_module_extension python)
|
function(pybind11_guess_python_module_extension python)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.15...4.0)
|
cmake_minimum_required(VERSION 3.15...4.2)
|
||||||
|
|
||||||
# Tests for pybind11_guess_python_module_extension
|
# Tests for pybind11_guess_python_module_extension
|
||||||
# Run using `cmake -P tools/test-pybind11GuessPythonExtSuffix.cmake`
|
# Run using `cmake -P tools/test-pybind11GuessPythonExtSuffix.cmake`
|
||||||
|
|||||||
Reference in New Issue
Block a user