Skip to content

Commit 8becb29

Browse files
authored
chore: bump CMake policy max to 4.3, list core-nanobind-shared (#77)
* chore: bump CMake policy max to 4.3 and list core-nanobind-shared Set the upper bound of every `cmake_minimum_required(VERSION min...max)` range to 4.3 uniformly across the sample projects, and add the `core-nanobind-shared` example to the top-level README project table. Assisted-by: ClaudeCode:claude-opus-4.8 * fix: keep CMake max at 3.26 for legacy FindPythonExtensions projects find_package(PythonExtensions) pulls in FindPythonInterp, which CMake removed in 3.27; capping the policy max below 3.27 keeps it available. Assisted-by: ClaudeCode:claude-opus-4.8
1 parent 6e1ddcf commit 8becb29

15 files changed

Lines changed: 15 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ configured via `[tool.scikit-build]`.
2020
| [`core-c-hello`](projects/core-c-hello) | Raw C extension |
2121
| [`core-cython-hello`](projects/core-cython-hello) | Cython via [cython-cmake](https://github.com/scikit-build/cython-cmake) |
2222
| [`core-pybind11-hello`](projects/core-pybind11-hello) | pybind11 binding |
23+
| [`core-nanobind-shared`](projects/core-nanobind-shared) | [nanobind](https://nanobind.readthedocs.io) binding linking a shared library shipped in the wheel |
2324
| [`hello-cmake-package`](projects/hello-cmake-package) | Standalone C library, exported CMake package, and pybind11 wrapper |
2425
| [`hello-free-threading`](projects/hello-free-threading) | Free-threaded (no-GIL) build; requires Python 3.13+ |
2526
| [`pi-fortran`](projects/pi-fortran) | Fortran via f2py and [f2py-cmake](https://github.com/scikit-build/f2py-cmake) |

projects/core-c-hello/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.26)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES C)
44

projects/core-cython-hello/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.26)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES C)
44

projects/core-nanobind-shared/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.30)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
44

projects/core-pybind11-hello/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.26)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
44

projects/hatchling-pybind11-hello/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.29)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)
44

projects/hello-cmake-package/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.15...3.26)
1+
cmake_minimum_required(VERSION 3.15...4.3)
22

33
project(
44
hello

projects/hello-cmake-package/tests/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14...3.19)
1+
cmake_minimum_required(VERSION 3.14...4.3)
22

33
project(hello-user VERSION 0.1.0)
44

projects/hello-cpp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Max stays <3.27: find_package(PythonExtensions) needs FindPythonInterp, removed in 3.27
12
cmake_minimum_required(VERSION 3.15...3.26)
23

34
project(hello)

projects/hello-cython/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Max stays <3.27: find_package(PythonExtensions) needs FindPythonInterp, removed in 3.27
12
cmake_minimum_required(VERSION 3.15...3.26)
23

34
project(hello_cython)

0 commit comments

Comments
 (0)