]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: promote uring package search to top-level
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 17 Oct 2023 16:59:41 +0000 (12:59 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 20 Oct 2023 13:42:36 +0000 (09:42 -0400)
For use by multiple projects, rocksdb in particular.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 3438de58f2af599901a19cf984e2e7cb1e9f6944)

CMakeLists.txt
src/blk/CMakeLists.txt

index b52e8f82f8e8bc2053aa34ead52724c7c43e5c2d..1df991f47b771bab07c8bda8e206967a37a9a980 100644 (file)
@@ -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)
 
index aaebc3c99f0f9713a0e4e49da1c97c3fb71c1785..437cfbec0c6fc0807375dff28458c8b0a0d5d565 100644 (file)
@@ -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()