mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
fix(cmake): allow forcing old FindPython (#5042)
This commit is contained in:
parent
ec73bdaf1f
commit
ddb8b67a8a
@ -173,12 +173,16 @@ endif()
|
|||||||
# Check to see which Python mode we are in, new, old, or no python
|
# Check to see which Python mode we are in, new, old, or no python
|
||||||
if(PYBIND11_NOPYTHON)
|
if(PYBIND11_NOPYTHON)
|
||||||
set(_pybind11_nopython ON)
|
set(_pybind11_nopython ON)
|
||||||
|
# We won't use new FindPython if PYBIND11_FINDPYTHON is defined and falselike
|
||||||
|
# Otherwise, we use if FindPythonLibs is missing or if FindPython was already used
|
||||||
elseif(
|
elseif(
|
||||||
_pybind11_missing_old_python STREQUAL "NEW"
|
(NOT DEFINED PYBIND11_FINDPYTHON OR PYBIND11_FINDPYTHON)
|
||||||
|
AND (_pybind11_missing_old_python STREQUAL "NEW"
|
||||||
OR PYBIND11_FINDPYTHON
|
OR PYBIND11_FINDPYTHON
|
||||||
OR Python_FOUND
|
OR Python_FOUND
|
||||||
OR Python2_FOUND
|
OR Python3_FOUND
|
||||||
OR Python3_FOUND)
|
))
|
||||||
|
|
||||||
# New mode
|
# New mode
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/pybind11NewTools.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/pybind11NewTools.cmake")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user