]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
compressor/zstd: include <zstd.h> instead of the bundled path 69188/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Sun, 31 May 2026 09:04:09 +0000 (17:04 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Sun, 31 May 2026 09:41:34 +0000 (17:41 +0800)
commitc20bdf81683558555d893e3e46cd035218f65d3b
tree9daf74ffeb1def1dd329d76ef788aa5525a4bbfa
parent0ee19106cfd5159d18c3ec75d73b71724a658ea8
compressor/zstd: include <zstd.h> instead of the bundled path

ZstdCompressor.h hard-codes #include "zstd/lib/zstd.h", which only
resolves because include_directories(src) puts the bundled submodule
on the search path. It thus silently depends on src/zstd being checked
out, and breaks with -DWITH_SYSTEM_ZSTD=ON where the submodule is absent.

ceph_zstd already links Zstd::Zstd, whose INTERFACE_INCLUDE_DIRECTORIES
points at the directory holding zstd.h in both modes: src/zstd/lib for
the bundled build, ${Zstd_INCLUDE_DIR} for the system one. Use <zstd.h>
so the include resolves through that interface either way.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/compressor/zstd/ZstdCompressor.h