]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: add WITH_SYSTEM_JERASURE option for system jerasure and gf-complete
authorKefu Chai <k.chai@proxmox.com>
Wed, 8 Apr 2026 10:37:25 +0000 (18:37 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 8 Apr 2026 10:42:19 +0000 (18:42 +0800)
commite35375b67324a875bd5e99a7758faf07259cc9ca
treed7e897e73b57c548726ec2ee94a053959b3f6df8
parentebbb3d75300d77cd14959e38f26131281a0b46de
cmake: add WITH_SYSTEM_JERASURE option for system jerasure and gf-complete

Add a cmake option to build ceph's erasure code plugins (ec_jerasure
and ec_shec) against system-provided jerasure and gf-complete libraries
instead of the vendored copies.

This allows downstream distributions to build with their own packaged
versions of these libraries. For instance, Debian has shipped
libjerasure-dev and libgf-complete-dev as build dependencies for ceph
since 2021, but the build always used the vendored copies because there
was no cmake option to use the system ones.

Using system libraries also lets distributions benefit from any
optimizations or fixes applied to their packages without having to
carry patches against ceph's vendored copies. For example, the vendored
gf-complete requires a downstream -O1 workaround to avoid emitting
SSE 4.1 instructions that crash on older CPUs. But with system libraries,
that becomes the library package's responsibility.

The option is OFF by default, preserving the current behavior of
building from vendored sources.

A new FindJerasure.cmake module locates the system jerasure and
gf-complete headers and libraries, and creates the Jerasure::jerasure
imported target with the same target name that the vendored build now
provides (see previous commit).

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
CMakeLists.txt
cmake/modules/FindJerasure.cmake [new file with mode: 0644]
src/erasure-code/CMakeLists.txt
src/erasure-code/jerasure/CMakeLists.txt