pybind / cmake_example

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

CMAKE_ARGS for building for conda-forge #52

Closed tdegeus closed 3 years ago

tdegeus commented 3 years ago

I noticed an addition for cross-compilation on macOS here https://github.com/pybind/cmake_example/commit/ce0ea77878522a85da0be13cf9e425626d05827e by @henryiii . In trying to make my feedstock work (https://github.com/conda-forge/gmattensor-feedstock/pull/13) I also got across the suggestion to pass the environment variable CMAKE_ARGS here. Does anyone know if that is really needed? And if so, it might not be so bad to add it to the example.

henryiii commented 3 years ago

For conda, that looks like a good idea - it seems they updated them. Not sure if this generally applicable, or just a conda-forge thing, but adding ${CMAKE_ARGS won't hurt if it's empty.

henryiii commented 3 years ago

Though, admittedly, since we run CMake internally, it has to be a change for everyone. Hmm, might discuss it in Scikit-Build first, and also see what they are adding to that variable.