]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
CMakeLists.txt: find aio for CRIMSON or BLUESTORE
authorMatan Breizman <mbreizma@redhat.com>
Mon, 2 Feb 2026 14:42:39 +0000 (16:42 +0200)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 12 Feb 2026 10:26:16 +0000 (10:26 +0000)
aio is used to set WITH_LIBURING, instead of finding it twice try to
find aio if either flags are set.
Does not change existing behavior for Bluestore.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
CMakeLists.txt

index fe9537d0f314615e0b7154eddde72c3fae1482ce..9c3e070282fb7d4cf4de2f1783b1fc89b654b3ac 100644 (file)
@@ -245,10 +245,7 @@ endif()
 
 option(WITH_BLUESTORE "Bluestore OSD backend" ON)
 if(WITH_BLUESTORE)
-  if(LINUX)
-    find_package(aio)
-    set(HAVE_LIBAIO ${AIO_FOUND})
-  elseif(FREEBSD)
+  if(FREEBSD)
     # POSIX AIO is integrated into FreeBSD kernel, and exposed by libc.
     set(HAVE_POSIXAIO ON)
   endif()
@@ -256,6 +253,13 @@ endif()
 
 option(WITH_CRIMSON "Build Crimson components" OFF)
 
+if(WITH_BLUESTORE OR WITH_CRIMSON)
+  if(LINUX)
+    find_package(aio)
+    set(HAVE_LIBAIO ${AIO_FOUND})
+  endif()
+endif()
+
 # libcryptsetup is only available on linux
 if(WITH_RBD AND LINUX)
   find_package(libcryptsetup 2.0.5 REQUIRED)