You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a static library which will be used by other pybind11 C++ project, and I want to use pybind11::gil_scoped_release in the code but I don't want to build a python module, so I can't call pybind11_add_module. How should I write my CMakeLists.txt then?
I tried add add_subdirectory(third_party/pybind11) to my CMakeLists.txt, but it seems not enough:
my.cc
#include "pybind11/pybind11.h" // fatal error: pybind11/pybind11.h: No such file or directory
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm building a static library which will be used by other pybind11 C++ project, and I want to use
pybind11::gil_scoped_release
in the code but I don't want to build a python module, so I can't callpybind11_add_module
. How should I write my CMakeLists.txt then?I tried add
add_subdirectory(third_party/pybind11)
to my CMakeLists.txt, but it seems not enough:Beta Was this translation helpful? Give feedback.
All reactions