Description
Currently, cmake
will auto-set CMAKE_INSTALL_PREFIX
to the output directory if it's not already set
Lines 699 to 703 in 94da9de
This probably makes sense on a general basis, but can cause some issues for crates whose C dependencies get grumpy if the install path is very long (e.g., jonhoo/rust-ibverbs#41). While callers can always set CMAKE_INSTALL_PREFIX
to something shorter (e.g., jonhoo/rust-ibverbs#44), especially since chances are no install step is executed, it may be preferable to allow bypassing the logic in cmake
entirely somehow and let the guest project's CMake rules (including the built-in ones) take effect. A bool
option on the builder should probably be sufficient.
It's worth pointing out that the current logic isn't as obviously correct if the calling code exports binary artifacts from the C build, because those built artifacts may in turn rely on CMAKE_INSTALL_PREFIX
in some way, which is unlikely to match the Rust build directory on whatever the intended runtime target system is.
Activity