[Caspar] Replace legacy FindCUDA with modern CMake CUDA language support + minor compile function improvements#457
Conversation
|
For reference: This was discovered while unit testing the ongoing integration of Caspar into Colmap. Would be very nice to have build files that work more nicely with larger project, hence my contribution. colmap/colmap#4018 |
aaron-skydio
left a comment
There was a problem hiding this comment.
Nice, just one question, otherwise looks good - thanks for the excellent description
aaron-skydio
left a comment
There was a problem hiding this comment.
Thanks, I'll get this merged
|
Sorry for the last minute change. Added an option to make compiling the Python bindings optional, as some projects may only use the C++ library. |
This should also be an option in the generate function. Will make a new PR based on this branch. |
[Caspar] Python bindings opt-out Projects embedding only the CXX/CUDA core of Caspar (e.g. via ExternalProject_Add) can now skip pybind11 entirely: - `CasparLibrary.generate(..., python_bindings=False)` skips generating pybinding.cc, caspar_mappings_pybinding.h, solver_pybinding.h, and .pyi stubs - The generated CMakeLists.txt omits the pybind11 find/fetch block and pybind11_add_module target entirely when python_bindings=False - When python_bindings=True (default), a CASPAR_BUILD_PYTHON_BINDINGS CMake option is still emitted for compile-time opt-out - All existing callers are unaffected since the default is True Blocked by #457 and requested by colmap/colmap#4018 such that we don't have to manually remove python bindings when regenerating. Closes #459 GitOrigin-RevId: 69b58a493f5a92e32174577cdfb6cb057f47fb24
I have tested this on sm_86 and sm_89 GPUs.