From: Kefu Chai Date: Wed, 20 Apr 2022 22:27:25 +0000 (+0800) Subject: cmake: try to find dml only if PMEM is enabled X-Git-Tag: v18.0.0~1028^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45977%2Fhead;p=ceph.git cmake: try to find dml only if PMEM is enabled as the feature dependent on DML library requires PMEM backend. Signed-off-by: Kefu Chai --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 42ab137775d7..82d900c6bddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,11 +212,6 @@ if(WITH_BLUESTORE) # POSIX AIO is integrated into FreeBSD kernel, and exposed by libc. set(HAVE_POSIXAIO ON) endif() - - if(LINUX) - find_package(dml) - set(HAVE_LIBDML ${DML_FOUND}) - endif() endif() # libcryptsetup is only available on linux @@ -243,6 +238,10 @@ CMAKE_DEPENDENT_OPTION(WITH_SYSTEM_LIBURING "Require and build with system libur CMAKE_DEPENDENT_OPTION(WITH_BLUESTORE_PMEM "Enable PMDK libraries" OFF "WITH_BLUESTORE" OFF) +if(WITH_BLUESTORE_PMEM) + find_package(dml) + set(HAVE_LIBDML ${DML_FOUND}) +endif() CMAKE_DEPENDENT_OPTION(WITH_RBD_MIGRATION_FORMAT_QCOW_V1 "Enable librbd QCOW v1 migration format support" ON