CMake / renaming the extension #962
-
Hi, I am experimenting with porting a project from pybind11 to nanobind. Our desired extension module name clashes Desired behaviour: import arbor but nanobind_add_module(arbor ...) # ERROR clashes with earlier name, the underlying C++ library. I checked the lower level CMake functionality's documentation, nanobind_add_module(pyarbor EXTENSION_NAME arbor ...) # CMake target is pyarbor, avoiding the clash. (or maybe there's a CMake trick I don't know about.) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In my cmake file, i am using something like this:
And in Macos this creates foo_.cpython-313-darwin.so |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll try that! |
Beta Was this translation helpful? Give feedback.
In my cmake file, i am using something like this:
And in Macos this creates foo_.cpython-313-darwin.so