Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add flag for overriding classic Python search values #4195

Merged
merged 3 commits into from
Oct 23, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/FindPythonLibsNew.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,13 @@ if(NOT _PYTHON_SUCCESS MATCHES 0)
return()
endif()

option(
PYBIND11_PYTHONLIBS_OVERRWRITE
henryiii marked this conversation as resolved.
Show resolved Hide resolved
"Overwrite cached values read from Python library (classic search). Turn off if cross-compiling and manually setting these values."
ON)
# Can manually set values when cross-compiling
macro(_PYBIND11_GET_IF_UNDEF lst index name)
if(NOT DEFINED "${name}")
if(PYBIND11_PYTHONLIBS_OVERRWRITE OR NOT DEFINED "${name}")
henryiii marked this conversation as resolved.
Show resolved Hide resolved
list(GET "${lst}" "${index}" "${name}")
endif()
endmacro()
Expand Down