mariadb/cmake/pmem.cmake
Sergey Vojtovich daaa881cfe libpmem cmake macros
Also added support for MAP_SYNC. It allows to achieve decent performance
with DAX devices even when libpmem is unavailable.

Fixed Windows version of my_msync(): according to manual FlushViewOfFile()
may return before flush is actually completed. It is advised to issue
FlushFileBuffers() after FlushViewOfFile().
2020-02-04 23:23:50 +04:00

13 lines
378 B
CMake

INCLUDE(CheckIncludeFiles)
OPTION(WITH_PMEM "Enable persistent memory features" OFF)
IF(WITH_PMEM)
FIND_LIBRARY(LIBPMEM pmem)
CHECK_INCLUDE_FILES(libpmem.h HAVE_LIBPMEM_H)
IF (NOT LIBPMEM)
MESSAGE(FATAL_ERROR "Can't find libpmem")
ELSEIF(NOT HAVE_LIBPMEM_H)
MESSAGE(FATAL_ERROR "Can't find libpmem.h")
ELSE()
ADD_DEFINITIONS(-DHAVE_PMEM)
ENDIF()
ENDIF()