message(STATUS "Not using BLKID")
endif(LINUX)
-option(WITH_BLUESTORE "Bluestore OSD backend" ON)
-if(WITH_BLUESTORE)
- find_package(aio)
- set(HAVE_LIBAIO ${AIO_FOUND})
-endif()
-
option(WITH_OPENLDAP "OPENLDAP is here" ON)
if(WITH_OPENLDAP)
find_package(OpenLdap REQUIRED)
set(HAVE_LIBZFS ${ZFS_FOUND})
endif()
+option(WITH_BLUESTORE "Bluestore OSD backend" ON)
+if(WITH_BLUESTORE)
+ find_package(aio)
+ set(HAVE_LIBAIO ${AIO_FOUND})
+endif()
+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
option(WITH_SPDK "Enable SPDK" ON)
else()
option(WITH_SPDK "Enable SPDK" OFF)
endif()
if(WITH_SPDK)
+ if(NOT WITH_BLUESTORE)
+ message(SEND_ERROR "Please enable WITH_BLUESTORE for using SPDK")
+ endif()
include(BuildSPDK)
build_spdk()
set(HAVE_SPDK TRUE)
endif(WITH_SPDK)
option(WITH_PMEM "Enable PMEM" OFF)
-if (WITH_PMEM)
+if(WITH_PMEM)
set(HAVE_PMEM ON)
+ if(NOT WITH_BLUESTORE)
+ message(SEND_ERROR "Please enable WITH_BLUESTORE for using PMEM")
+ endif()
+endif()
+
+if(WITH_BLUESTORE)
+ if(NOT AIO_FOUND AND NOT WITH_SPDK AND NOT WITH_PMEM)
+ message(SEND_ERROR "WITH_BLUESTORE is ON, "
+ "but none of the bluestore backends is enabled. "
+ "Please install libaio, or enable WITH_SPDK or WITH_PMEM (experimental)")
+ endif()
endif()
option(WITH_BLUEFS "libbluefs library" OFF)