mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix: support CMake 3.27, drop 3.4 (#4719)
* fix: support CMake 3.27, drop 3.4 Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update upgrade.rst * Update upgrade.rst * Update upgrade.rst --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -163,11 +163,19 @@ endif()
|
||||
|
||||
# --------------------- Python specifics -------------------------
|
||||
|
||||
# CMake 3.27 removes the classic FindPythonInterp if CMP0148 is NEW
|
||||
if(CMAKE_VERSION VERSION_LESS "3.27")
|
||||
set(_pybind11_missing_old_python "OLD")
|
||||
else()
|
||||
cmake_policy(GET CMP0148 _pybind11_missing_old_python)
|
||||
endif()
|
||||
|
||||
# Check to see which Python mode we are in, new, old, or no python
|
||||
if(PYBIND11_NOPYTHON)
|
||||
set(_pybind11_nopython ON)
|
||||
elseif(
|
||||
PYBIND11_FINDPYTHON
|
||||
_pybind11_missing_old_python STREQUAL "NEW"
|
||||
OR PYBIND11_FINDPYTHON
|
||||
OR Python_FOUND
|
||||
OR Python2_FOUND
|
||||
OR Python3_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user