2017-02-28 23:49:04 +00:00
|
|
|
option (ENABLE_JEMALLOC "Set to TRUE to use jemalloc instead of tcmalloc" OFF)
|
|
|
|
|
2017-01-27 20:00:02 +00:00
|
|
|
if (ENABLE_JEMALLOC)
|
|
|
|
find_package(JeMalloc)
|
|
|
|
|
|
|
|
if (JEMALLOC_INCLUDE_DIR AND JEMALLOC_LIBRARIES)
|
2017-02-27 21:07:57 +00:00
|
|
|
include_directories (${JEMALLOC_INCLUDE_DIR})
|
2017-01-27 20:00:02 +00:00
|
|
|
set (USE_JEMALLOC 1)
|
|
|
|
if (USE_TCMALLOC)
|
2017-02-27 21:07:57 +00:00
|
|
|
message (WARNING "Disabling tcmalloc")
|
2017-01-27 20:00:02 +00:00
|
|
|
set (USE_TCMALLOC 0)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2017-02-27 21:07:57 +00:00
|
|
|
message (STATUS "Using jemalloc=${USE_JEMALLOC}: ${JEMALLOC_INCLUDE_DIR} : ${JEMALLOC_LIBRARIES}")
|
2017-01-27 20:00:02 +00:00
|
|
|
endif ()
|