From 4d0a1dc76cf488535fe0380ecc45e112cba06682 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 23 Dec 2025 12:07:09 -0500 Subject: [PATCH 1/3] chore: bupm CMake to 4.1 Signed-off-by: Henry Schreiner --- CMakeLists.txt | 2 +- docs/advanced/embedding.rst | 2 +- docs/compiling.rst | 10 +++++----- tests/CMakeLists.txt | 2 +- tests/test_cmake_build/installed_embed/CMakeLists.txt | 2 +- .../test_cmake_build/installed_function/CMakeLists.txt | 2 +- tests/test_cmake_build/installed_target/CMakeLists.txt | 2 +- .../test_cmake_build/subdirectory_embed/CMakeLists.txt | 2 +- .../subdirectory_function/CMakeLists.txt | 2 +- .../subdirectory_target/CMakeLists.txt | 2 +- tools/pybind11GuessPythonExtSuffix.cmake | 2 +- tools/test-pybind11GuessPythonExtSuffix.cmake | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba5f665a2f..1f10ce0697 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.27") cmake_policy(GET CMP0148 _pybind11_cmp0148) endif() -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) if(_pybind11_cmp0148) cmake_policy(SET CMP0148 ${_pybind11_cmp0148}) diff --git a/docs/advanced/embedding.rst b/docs/advanced/embedding.rst index 3ac0579385..5a760b6341 100644 --- a/docs/advanced/embedding.rst +++ b/docs/advanced/embedding.rst @@ -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.1) project(example) find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)` diff --git a/docs/compiling.rst b/docs/compiling.rst index cedeefa060..14b1fe5fa1 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -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.1) 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.1) 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.1) 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.1) 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.1) project(example LANGUAGES CXX) find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2cf18c3547..43c20d8b1c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,7 +5,7 @@ # 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.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) # Filter out items; print an optional message if any items filtered. This ignores extensions. # diff --git a/tests/test_cmake_build/installed_embed/CMakeLists.txt b/tests/test_cmake_build/installed_embed/CMakeLists.txt index 8561ef4381..70a1c1ca17 100644 --- a/tests/test_cmake_build/installed_embed/CMakeLists.txt +++ b/tests/test_cmake_build/installed_embed/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_installed_embed CXX) diff --git a/tests/test_cmake_build/installed_function/CMakeLists.txt b/tests/test_cmake_build/installed_function/CMakeLists.txt index 8e75f86e64..7c9e31e47b 100644 --- a/tests/test_cmake_build/installed_function/CMakeLists.txt +++ b/tests/test_cmake_build/installed_function/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_installed_function CXX) diff --git a/tests/test_cmake_build/installed_target/CMakeLists.txt b/tests/test_cmake_build/installed_target/CMakeLists.txt index d8af4391ba..ffee739842 100644 --- a/tests/test_cmake_build/installed_target/CMakeLists.txt +++ b/tests/test_cmake_build/installed_target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_installed_target CXX) diff --git a/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt b/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt index d84916ea77..f0669caef2 100644 --- a/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_subdirectory_embed CXX) diff --git a/tests/test_cmake_build/subdirectory_function/CMakeLists.txt b/tests/test_cmake_build/subdirectory_function/CMakeLists.txt index f355492888..0c39980df2 100644 --- a/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_function/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_subdirectory_function CXX) diff --git a/tests/test_cmake_build/subdirectory_target/CMakeLists.txt b/tests/test_cmake_build/subdirectory_target/CMakeLists.txt index aadc8c0d8f..c14328acdd 100644 --- a/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) project(test_subdirectory_target CXX) diff --git a/tools/pybind11GuessPythonExtSuffix.cmake b/tools/pybind11GuessPythonExtSuffix.cmake index b8c351ef08..0bed186908 100644 --- a/tools/pybind11GuessPythonExtSuffix.cmake +++ b/tools/pybind11GuessPythonExtSuffix.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) function(pybind11_guess_python_module_extension python) diff --git a/tools/test-pybind11GuessPythonExtSuffix.cmake b/tools/test-pybind11GuessPythonExtSuffix.cmake index a66282db26..fc501677da 100644 --- a/tools/test-pybind11GuessPythonExtSuffix.cmake +++ b/tools/test-pybind11GuessPythonExtSuffix.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.0) +cmake_minimum_required(VERSION 3.15...4.1) # Tests for pybind11_guess_python_module_extension # Run using `cmake -P tools/test-pybind11GuessPythonExtSuffix.cmake` From b87afca28f563c29ee74359f4cf51e182e6690bd Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 23 Dec 2025 12:13:10 -0500 Subject: [PATCH 2/3] ci: use newest version of CMake in a few places Signed-off-by: Henry Schreiner --- .github/workflows/configure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index 6a3b365de0..cf6e23906d 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -39,10 +39,10 @@ jobs: cmake: "3.15" - runs-on: macos-14 - cmake: "4.0" + cmake: "4.2" - runs-on: windows-latest - cmake: "4.0" + cmake: "4.2" name: 🐍 3.11 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }} From f8bb0bc7ca4d7f3c43c7b4b955120296e6f5340c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 23 Dec 2025 12:13:18 -0500 Subject: [PATCH 3/3] chore: bupm CMake to 4.2 Signed-off-by: Henry Schreiner --- CMakeLists.txt | 2 +- docs/advanced/embedding.rst | 2 +- docs/compiling.rst | 10 +++++----- tests/CMakeLists.txt | 2 +- tests/test_cmake_build/installed_embed/CMakeLists.txt | 2 +- .../test_cmake_build/installed_function/CMakeLists.txt | 2 +- tests/test_cmake_build/installed_target/CMakeLists.txt | 2 +- .../test_cmake_build/subdirectory_embed/CMakeLists.txt | 2 +- .../subdirectory_function/CMakeLists.txt | 2 +- .../subdirectory_target/CMakeLists.txt | 2 +- tools/pybind11GuessPythonExtSuffix.cmake | 2 +- tools/test-pybind11GuessPythonExtSuffix.cmake | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f10ce0697..c0991971e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.27") cmake_policy(GET CMP0148 _pybind11_cmp0148) endif() -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) if(_pybind11_cmp0148) cmake_policy(SET CMP0148 ${_pybind11_cmp0148}) diff --git a/docs/advanced/embedding.rst b/docs/advanced/embedding.rst index 5a760b6341..6264dbfd9c 100644 --- a/docs/advanced/embedding.rst +++ b/docs/advanced/embedding.rst @@ -18,7 +18,7 @@ information, see :doc:`/compiling`. .. code-block:: cmake - cmake_minimum_required(VERSION 3.15...4.1) + cmake_minimum_required(VERSION 3.15...4.2) project(example) find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)` diff --git a/docs/compiling.rst b/docs/compiling.rst index 14b1fe5fa1..fd85b004dd 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -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.1) + 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.1) + 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.1) + 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.1) + 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.1) + cmake_minimum_required(VERSION 3.15...4.2) project(example LANGUAGES CXX) find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 43c20d8b1c..ebcd15b6d4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,7 +5,7 @@ # 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.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) # Filter out items; print an optional message if any items filtered. This ignores extensions. # diff --git a/tests/test_cmake_build/installed_embed/CMakeLists.txt b/tests/test_cmake_build/installed_embed/CMakeLists.txt index 70a1c1ca17..a364966554 100644 --- a/tests/test_cmake_build/installed_embed/CMakeLists.txt +++ b/tests/test_cmake_build/installed_embed/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_installed_embed CXX) diff --git a/tests/test_cmake_build/installed_function/CMakeLists.txt b/tests/test_cmake_build/installed_function/CMakeLists.txt index 7c9e31e47b..d27741123a 100644 --- a/tests/test_cmake_build/installed_function/CMakeLists.txt +++ b/tests/test_cmake_build/installed_function/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_installed_function CXX) diff --git a/tests/test_cmake_build/installed_target/CMakeLists.txt b/tests/test_cmake_build/installed_target/CMakeLists.txt index ffee739842..6ee01693df 100644 --- a/tests/test_cmake_build/installed_target/CMakeLists.txt +++ b/tests/test_cmake_build/installed_target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_installed_target CXX) diff --git a/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt b/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt index f0669caef2..2221561ae9 100644 --- a/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_subdirectory_embed CXX) diff --git a/tests/test_cmake_build/subdirectory_function/CMakeLists.txt b/tests/test_cmake_build/subdirectory_function/CMakeLists.txt index 0c39980df2..10b283deed 100644 --- a/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_function/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_subdirectory_function CXX) diff --git a/tests/test_cmake_build/subdirectory_target/CMakeLists.txt b/tests/test_cmake_build/subdirectory_target/CMakeLists.txt index c14328acdd..88d73f6045 100644 --- a/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +++ b/tests/test_cmake_build/subdirectory_target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) project(test_subdirectory_target CXX) diff --git a/tools/pybind11GuessPythonExtSuffix.cmake b/tools/pybind11GuessPythonExtSuffix.cmake index 0bed186908..5c2a229f82 100644 --- a/tools/pybind11GuessPythonExtSuffix.cmake +++ b/tools/pybind11GuessPythonExtSuffix.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) function(pybind11_guess_python_module_extension python) diff --git a/tools/test-pybind11GuessPythonExtSuffix.cmake b/tools/test-pybind11GuessPythonExtSuffix.cmake index fc501677da..a9ecc29f1f 100644 --- a/tools/test-pybind11GuessPythonExtSuffix.cmake +++ b/tools/test-pybind11GuessPythonExtSuffix.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15...4.1) +cmake_minimum_required(VERSION 3.15...4.2) # Tests for pybind11_guess_python_module_extension # Run using `cmake -P tools/test-pybind11GuessPythonExtSuffix.cmake`