Skip to content

Commit bb504dd

Browse files
authored
fix: FindPython by default logic error (#5561)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 655c60d commit bb504dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/pybind11Common.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,11 @@ if(PYBIND11_NOPYTHON)
184184
# We won't use new FindPython if PYBIND11_FINDPYTHON is defined and falselike
185185
# Otherwise, we use if FindPythonLibs is missing or if FindPython was already used
186186
elseif(
187-
(NOT DEFINED PYBIND11_FINDPYTHON OR PYBIND11_FINDPYTHON)
187+
(NOT DEFINED PYBIND11_FINDPYTHON
188+
OR PYBIND11_FINDPYTHON STREQUAL "COMPAT"
189+
OR PYBIND11_FINDPYTHON)
188190
AND (_pybind11_missing_old_python STREQUAL "NEW"
191+
OR PYBIND11_FINDPYTHON STREQUAL "COMPAT"
189192
OR PYBIND11_FINDPYTHON
190193
OR Python_FOUND
191194
OR Python3_FOUND

0 commit comments

Comments
 (0)