Skip to content

Commit

Permalink
pybind11 superbuild: set PYTHON_EXECUTABLE
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja>
  • Loading branch information
ax3l committed Oct 11, 2024
1 parent f2570e8 commit 240592f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/dependencies/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ function(find_pybind11)
message(STATUS "pybind11 repository: ${openPMD_pybind11_repo} (${openPMD_pybind11_branch})")
endif()
endif()

# Propagate Python to pybind11 in superbuilds
if(openPMD_USE_INTERNAL_PYBIND11)
# we found Python via find_package(Python ...) below, but pybind11 has some
# additional internal logic in FindPythonLibsNew.cmake can mix things up
# https://github.com/openPMD/openPMD-api/pull/1677#issuecomment-2407743771
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif()

if(TARGET pybind11::module)
# nothing to do, target already exists in the superbuild
elseif(openPMD_USE_INTERNAL_PYBIND11 AND openPMD_pybind11_src)
Expand Down

0 comments on commit 240592f

Please sign in to comment.