From f2fe37c4171206aa87171b6ffb1de00a8ec8099b Mon Sep 17 00:00:00 2001 From: Riccardo Milani Date: Thu, 4 Apr 2024 12:31:35 +0200 Subject: [PATCH] build: Update pybind11 to v1.12.0 It should fix some bugs with newer python versions --- CMakeLists.txt | 6 +++++- pybind11 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aefbaff..d0c12c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,9 +167,13 @@ endif() #set_source_files_properties(${CoMMA_TEST} PROPERTIES COMPILE_FLAGS "--coverage") ######################## Pybind11 bindings #################################### if ( BUILD_PYTHON_BINDINGS ) + # We use pybind11, see https://pybind11.readthedocs.io/en/latest/compiling.html#building-with-cmake message(STATUS "Python bindings enabled") # find the Python interpreter (including pybind might lead to other find files being used) - find_package(Python COMPONENTS Interpreter Development) + find_package(Python COMPONENTS Interpreter Development REQUIRED) + # Without the following, CMake and pybind seems to find different versions of python + # https://pybind11.readthedocs.io/en/stable/faq.html#inconsistent-detection-of-python-version-in-cmake-and-pybind11 + # option(PYBIND11_FINDPYTHON "Use pybind11 to find python" ON) add_subdirectory(pybind11) pybind11_add_module(${CoMMA_PYTHON} ${PYTHONBIND}) target_link_libraries(${CoMMA_PYTHON} PUBLIC ${CoMMA_LIB}) diff --git a/pybind11 b/pybind11 index 70a58c5..3e9dfa2 160000 --- a/pybind11 +++ b/pybind11 @@ -1 +1 @@ -Subproject commit 70a58c577eaf067748c2ec31bfd0b0a614cffba6 +Subproject commit 3e9dfa2866941655c56877882565e7577de6fc7b