Skip to content

Commit

Permalink
merge: Merge branch 'build/update_pybind' into 'main'
Browse files Browse the repository at this point in the history
Update pybind11 to v1.12.0

See merge request numerics/solver/comma!45
  • Loading branch information
Riccardo Milani committed Apr 4, 2024
2 parents 2e54045 + f2fe37c commit 5512e16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion pybind11
Submodule pybind11 updated 227 files

0 comments on commit 5512e16

Please sign in to comment.