]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: allow use libzstd in system
authorKefu Chai <kchai@redhat.com>
Wed, 31 Mar 2021 04:15:17 +0000 (12:15 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 31 Mar 2021 05:39:16 +0000 (13:39 +0800)
commit9760be061bbe24a5c16e8700e09bba8ac0d663fd
tree9a9d4072046bf68ce521180c218b175aca666c3a
parent63fa6bfd70febec2b4ca78a68891324551f69f7a
cmake: allow use libzstd in system

since we are moving the test nodes from bionic to focal, we are able to
use the prebuilt libzstd libraries when running "make check". to speed
up the build and test, in this change:

* add FindZstd.cmake which allows us to use the libzstd in system
* extract BuildZstd.cmake for better readability
* add an option named "WITH_SYSTEM_ZSTD", which defaults to "OFF",
  so user can enable it on demand.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 16fd07244dd25b46ab1b5a9a3180a354d13c9245)

Conflicts:
src/compressor/zstd/CMakeLists.txt: minor resolution
cmake/modules/BuildZstd.cmake [new file with mode: 0644]
cmake/modules/FindZstd.cmake [new file with mode: 0644]
src/compressor/zstd/CMakeLists.txt