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:
Henry Schreiner
2024-08-14 18:21:04 -04:00
committed by GitHub
parent d893f9723a
commit 28dbce4157
20 changed files with 112 additions and 290 deletions

View File

@@ -81,7 +81,7 @@ nox -s build
### Full setup
To setup an ideal development environment, run the following commands on a
system with CMake 3.14+:
system with CMake 3.15+:
```bash
python3 -m venv venv
@@ -96,8 +96,8 @@ Tips:
* You can use `virtualenv` (faster, from PyPI) instead of `venv`.
* You can select any name for your environment folder; if it contains "env" it
will be ignored by git.
* If you don't have CMake 3.14+, just add "cmake" to the pip install command.
* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+
* If you don't have CMake 3.15+, just add "cmake" to the pip install command.
* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython.
* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`.
FindPython uses `-DPython_ROOT_DIR=/path/to` or
`-DPython_EXECUTABLE=/path/to/python`.
@@ -149,8 +149,8 @@ To run the tests, you can "build" the check target:
cmake --build build --target check
```
`--target` can be spelled `-t` in CMake 3.15+. You can also run individual
tests with these targets:
`--target` can be spelled `-t`. You can also run individual tests with these
targets:
* `pytest`: Python tests only, using the
[pytest](https://docs.pytest.org/en/stable/) framework

View File

@@ -31,7 +31,7 @@ jobs:
include:
- runs-on: ubuntu-20.04
arch: x64
cmake: "3.5"
cmake: "3.15"
- runs-on: ubuntu-20.04
arch: x64
@@ -39,7 +39,7 @@ jobs:
- runs-on: macos-13
arch: x64
cmake: "3.8"
cmake: "3.15"
- runs-on: windows-2019
arch: x64 # x86 compilers seem to be missing on 2019 image