diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt index 311ad27292c..c39a44fb896 100644 --- a/cmake/dependencies/CMakeLists.txt +++ b/cmake/dependencies/CMakeLists.txt @@ -164,7 +164,7 @@ if(BUILD_PYTHON AND BUILD_pybind11) pybind11 GIT_REPOSITORY "https://github.com/pybind/pybind11.git" GIT_TAG "v2.10.3" - #PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/pybind11-2.10.3.patch" + PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/pybind11.patch" ) FetchContent_MakeAvailable(pybind11) list(POP_BACK CMAKE_MESSAGE_INDENT) diff --git a/patches/pybind11.patch b/patches/pybind11.patch new file mode 100644 index 00000000000..579896e0c74 --- /dev/null +++ b/patches/pybind11.patch @@ -0,0 +1,12 @@ +diff --git a/tools/pybind11NewTools.cmake b/tools/pybind11NewTools.cmake +index 7d7424a7..c007fb01 100644 +--- a/tools/pybind11NewTools.cmake ++++ b/tools/pybind11NewTools.cmake +@@ -23,6 +23,7 @@ else() + endif() + + if(NOT Python_FOUND AND NOT Python3_FOUND) ++ message(FATAL_ERROR "Should not pass here") + if(NOT DEFINED Python_FIND_IMPLEMENTATIONS) + set(Python_FIND_IMPLEMENTATIONS CPython PyPy) + endif()