From: Matan Breizman Date: Mon, 2 Feb 2026 14:42:39 +0000 (+0200) Subject: CMakeLists.txt: find aio for CRIMSON or BLUESTORE X-Git-Tag: testing/wip-vshankar-testing-20260219.125903~9^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f95b264aabf2803e3b5e510c5b199a35d663557f;p=ceph-ci.git CMakeLists.txt: find aio for CRIMSON or BLUESTORE 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fe9537d0f31..9c3e070282f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)