pybind / cmake_example

Example pybind11 module built with a CMake-based build system
Other
626 stars 220 forks source link

allow multiple extensions #72

Closed youkaichao closed 2 years ago

youkaichao commented 2 years ago

Hi, I find that simple modifications can support multiple CMakeExtension (sub)modules compiled in one project, which should be a useful feature I think.

If this is welcome, I can further update the project to be a demo with multiple submodules compiled by CMake :)

youkaichao commented 2 years ago

@henryiii what happened? 👀

henryiii commented 2 years ago

I restored the build by opening/closing, and it basically works, except I haven't removed the windows-2016 builds yet, apparently. :/

henryiii commented 2 years ago

I think it's just a little confused, it's okay to go in. :)

youkaichao commented 2 years ago

@henryiii and it's time to remove the comment https://github.com/pybind/cmake_example/blob/master/setup.py#L19-L20 :)

henryiii commented 2 years ago

Yeah, I thought about about that - long term I still want to gently point people at scikit-build, as having thousands (roughly) of copies of this in various packages is not the way to go (and it hits every time something has to be updated, like M1 support). But you are right, it's not correct anymore (as long as this works properly!).

youkaichao commented 2 years ago

yeah, I think the solution of this pr works for a small package with multiple CMake extensions. If I understand correctly, scikit-build brings many additional functionalities way beyond just supporting multiple CMake extensions.

In my opinion, we can remove the comments and replace them with something like For more advanced control of the building process, please check out scikit-build .