Skip to content

Commit

Permalink
PYBIND11_FINDPYTHON=ON
Browse files Browse the repository at this point in the history
Reuse our `find_package(Python ...)` call and use new CMake logic in
pybind11.
https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake

Signed-off-by: Axel Huebl <[email protected]>
  • Loading branch information
ax3l committed Oct 11, 2024
1 parent dc68659 commit 4ebb35b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/dependencies/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ function(find_pybind11)
message(STATUS "pybind11 repository: ${WarpX_pybind11_repo} (${WarpX_pybind11_branch})")
include(FetchContent)
endif()

# rely on our find_package(Python ...) call
# https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake
set(PYBIND11_FINDPYTHON ON)

if(WarpX_pybind11_internal OR WarpX_pybind11_src)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

Expand Down

0 comments on commit 4ebb35b

Please sign in to comment.