From: Patrick Donnelly Date: Tue, 17 Oct 2023 16:59:41 +0000 (-0400) Subject: cmake: promote uring package search to top-level X-Git-Tag: v17.2.8~605^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=049f80e74e70203ae3e6c211cff67637e18ed12b;p=ceph.git cmake: promote uring package search to top-level For use by multiple projects, rocksdb in particular. Signed-off-by: Patrick Donnelly (cherry picked from commit 3438de58f2af599901a19cf984e2e7cb1e9f6944) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b52e8f82f8e..1df991f47b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,15 @@ set(HAVE_LIBURING ${WITH_LIBURING}) CMAKE_DEPENDENT_OPTION(WITH_SYSTEM_LIBURING "Require and build with system liburing" OFF "HAVE_LIBAIO;WITH_BLUESTORE" OFF) +if(WITH_LIBURING) + if(WITH_SYSTEM_LIBURING) + find_package(uring REQUIRED) + else() + include(Builduring) + build_uring() + endif() +endif() + CMAKE_DEPENDENT_OPTION(WITH_BLUESTORE_PMEM "Enable PMDK libraries" OFF "WITH_BLUESTORE" OFF) diff --git a/src/blk/CMakeLists.txt b/src/blk/CMakeLists.txt index aaebc3c99f0..437cfbec0c6 100644 --- a/src/blk/CMakeLists.txt +++ b/src/blk/CMakeLists.txt @@ -52,11 +52,5 @@ if(WITH_EVENTTRACE) endif() if(WITH_LIBURING) - if(WITH_SYSTEM_LIBURING) - find_package(uring REQUIRED) - else() - include(Builduring) - build_uring() - endif() target_link_libraries(blk PRIVATE uring::uring) endif()