Skip to content

Commit

Permalink
show pmem detection in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed May 19, 2021
1 parent b2340cd commit ecd6588
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cmake/FindPMEM.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
if(PMEM_LIBRARIES)
set(PMEM_FOUND TRUE)
return()
endif()
if(DEFINED PMEM_LIBRARIES)
set(PMEM_FOUND FALSE)
return()
endif()

find_path(PMEM_INCLUDE_DIR NAMES libpmem.h)
find_library(PMEM_LIBRARIES NAMES pmem)

Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ SET(INNOBASE_SOURCES
ut/ut0wqueue.cc)

OPTION(WITH_PMEM "Support redo log in persistent memory" OFF)
FIND_PACKAGE(PMEM QUIET)
FIND_PACKAGE(PMEM)
IF(PMEM_FOUND)
INCLUDE_DIRECTORIES(${PMEM_INCLUDES})
ADD_COMPILE_FLAGS(log/log0log.cc COMPILE_FLAGS "-DHAVE_PMEM")
Expand Down

0 comments on commit ecd6588

Please sign in to comment.