rapidsai / rmm

RAPIDS Memory Manager
https://docs.rapids.ai/api/rmm/stable/
Apache License 2.0
492 stars 198 forks source link

[FEA] Default to `BUILD_SHARED_LIBS=ON` in cmakelists #1701

Closed wence- closed 1 month ago

wence- commented 1 month ago

Is your feature request related to a problem? Please describe.

Although RMM is header-only, for many rapids builds (in the devcontainers in particular), downstream packages get common shared dependencies transitively through RMM. Other rapids libraries advertise, in cmakelists, BUILD_SHARED_LIBS as an option that defaults to ON, but RMM does not.

Consequently, the fmt dependency we get from RMM is not configured with -DFMT_SHARED and so transitively every downstream package also does not have that compile flag.

This causes a mismatch in the compilation command when running build-all in the combined rapids devcontainers compared to the nightly CI-based builds, since those explicitly request -DBUILD_SHARED_LIBS=ON

If we set this option and defaulted it to ON in RMM, then a naive (read, me) user who runs build-all would hit the cache populated by CI builds.