mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix(cmake): avoid message if FINDPYTHON NEW (#5656)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -200,19 +200,21 @@ elseif(
|
||||
else()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/pybind11NewTools.cmake")
|
||||
|
||||
message(
|
||||
"Using compatibility mode for Python, set PYBIND11_FINDPYTHON to NEW/OLD to silence this message"
|
||||
)
|
||||
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
|
||||
set(PYTHON_INCLUDE_DIR "${Python_INCLUDE_DIR}")
|
||||
set(Python_INCLUDE_DIRS "${Python_INCLUDE_DIRS}")
|
||||
set(PYTHON_LIBRARY "${Python_LIBRARY}")
|
||||
set(PYTHON_LIBRARIES "${Python_LIBRARIES}")
|
||||
set(PYTHON_VERSION "${Python_VERSION}")
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_STRING}")
|
||||
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}")
|
||||
set(PYTHON_VERSION_PATCH "${Python_VERSION_PATCH}")
|
||||
if(PYBIND11_FINDPYTHON STREQUAL "COMPAT")
|
||||
message(
|
||||
"Using compatibility mode for Python, set PYBIND11_FINDPYTHON to NEW/OLD to silence this message"
|
||||
)
|
||||
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
|
||||
set(PYTHON_INCLUDE_DIR "${Python_INCLUDE_DIR}")
|
||||
set(Python_INCLUDE_DIRS "${Python_INCLUDE_DIRS}")
|
||||
set(PYTHON_LIBRARY "${Python_LIBRARY}")
|
||||
set(PYTHON_LIBRARIES "${Python_LIBRARIES}")
|
||||
set(PYTHON_VERSION "${Python_VERSION}")
|
||||
set(PYTHON_VERSION_STRING "${Python_VERSION_STRING}")
|
||||
set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
|
||||
set(PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}")
|
||||
set(PYTHON_VERSION_PATCH "${Python_VERSION_PATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user