endif()
endif()
+include(CMakeDependentOption)
+CMAKE_DEPENDENT_OPTION(WITH_BLUESTORE_PMEM "Enable PMDK libraries" OFF
+ "WITH_BLUESTORE" OFF)
+
+if(WITH_BLUESTORE_PMEM)
+ set(HAVE_BLUESTORE_PMEM ON)
+endif()
+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64|aarch64")
option(WITH_SPDK "Enable SPDK" ON)
else()
set(HAVE_SPDK TRUE)
endif(WITH_SPDK)
-option(WITH_PMEM "Enable PMEM" OFF)
-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 HAVE_POSIXAIO AND NOT WITH_SPDK AND NOT WITH_PMEM)
+ if(NOT AIO_FOUND AND NOT HAVE_POSIXAIO AND NOT WITH_SPDK AND NOT WITH_BLUESTORE_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)")
+ "Please install libaio, or enable WITH_SPDK or WITH_BLUESTORE_PMEM (experimental)")
endif()
endif()
/* DPDK conditional compilation */
#cmakedefine HAVE_DPDK
-/* PMEM conditional compilation */
-#cmakedefine HAVE_PMEM
+/* PMEM_DEVICE (OSD) conditional compilation */
+#cmakedefine HAVE_BLUESTORE_PMEM
/* Defined if LevelDB supports bloom filters */
#cmakedefine HAVE_LEVELDB_FILTER_POLICY
FuseStore.cc)
endif(WITH_FUSE)
-if(WITH_PMEM)
+if(WITH_BLUESTORE_PMEM)
list(APPEND libos_srcs
bluestore/PMEMDevice.cc)
-endif(WITH_PMEM)
+endif()
if(HAVE_LIBXFS)
list(APPEND libos_srcs
DESTINATION bin)
endif()
-if(WITH_PMEM)
+if(WITH_BLUESTORE_PMEM)
include(ExternalProject)
ExternalProject_Add(nvml_ext
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
INTERFACE_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(os pmem)
target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/nvml/src/include")
-endif(WITH_PMEM)
+endif(WITH_BLUESTORE_PMEM)
if(WITH_LTTNG AND WITH_EVENTTRACE)
add_dependencies(os eventtrace_tp)
#include "NVMEDevice.h"
#endif
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
#include "PMEMDevice.h"
#include "libpmem.h"
#endif
type = "ust-nvme";
}
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
if (type == "kernel") {
int is_pmem = 0;
size_t map_len = 0;
dout(1) << __func__ << " path " << path << " type " << type << dendl;
-#if defined(HAVE_PMEM)
+#if defined(HAVE_BLUESTORE_PMEM)
if (type == "pmem") {
return new PMEMDevice(cct, cb, cbpriv);
}