summaryrefslogtreecommitdiff
path: root/cmake/pmem.cmake
blob: b59db3cc1f99403a4c39687fb3671eedc8142d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()