scikit-build / scikit-build-core

A next generation Python CMake adaptor and Python API for plugins
https://scikit-build-core.readthedocs.io
Apache License 2.0
241 stars 48 forks source link

Package multiple configs? #873

Open alexreinking opened 2 months ago

alexreinking commented 2 months ago

Currently, scikit-build-core builds a CMake project only once, in Release mode by default. It would be useful to be able to additionally package Debug binaries.

This would involve re-configuring with -DCMAKE_BUILD_TYPE=Debug in place and re-running the build for single-config generators (Ninja). For multi-config generators (e.g. Visual Studio), it would need to run cmake --build ... --config Debug. Then one would simply install to the same prefix.

Naturally this should be opt-in, perhaps by setting cmake.build-type to a list of types. It might additionally be useful to provide an option to use multiple build directories rather than reconfiguring in place when using a single-config generator. Some projects break under such circumstances.

LecrisUT commented 2 months ago

Would make sense for non-python wheels.

What is the install process for the libraries in this case? And how would the python library part make sure it is linked to at least one version of the library? I think this would make sense in the editable environment, but I'm not sure about the wheel install part.

henryiii commented 2 months ago

We should look at what py-build-cmake does, as that is supported there. Maybe this would make more sense once we have an install command?