CMake / renaming the extension #962
Unanswered
thorstenhater
asked this question in
Q&A
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.
0 replies
-
Thanks, I'll try that! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am experimenting with porting a project from pybind11 to nanobind. Our desired extension module name clashes
with the C++ library name in CMake. Is there a way to define a target separate from the generated extension's name.
Renaming the considerable amount of uses of the original name would be hard.
Desired behaviour:
but
nanobind_add_module(arbor ...) # ERROR
clashes with earlier name, the underlying C++ library. I checked the lower level CMake functionality's documentation,
but didn't find an option for this. Preferably something like this
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.
All reactions