Skip to content

Commit

Permalink
TEST: Add pybind11 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 24, 2023
1 parent 7c42a0d commit 30a9e63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions patches/pybind11.patch
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 30a9e63

Please sign in to comment.