From dc51bd716b53f41aa8afcb42c21062b79fbaa9b4 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Tue, 15 Nov 2016 17:27:48 -0800 Subject: [PATCH] CMakeLists.txt: FreeBSD has jemalloc as default malloc Summary: This will allow reference to `malloc_stats_print` Closes https://github.com/facebook/rocksdb/pull/1516 Differential Revision: D4187258 Pulled By: siying fbshipit-source-id: 34ae9f9 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72b630114..521c21427 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,11 @@ else() add_definitions(-DROCKSDB_JEMALLOC) include_directories(${JEMALLOC_INCLUDE_DIR}) endif() + if(CMAKE_SYSTEM_NAME STEQUAL "FreeBSD") + # FreeBSD has jemaloc as default malloc + add_definitions(-DROCKSDB_JEMALLOC) + set(WITH_JEMALLOC, ON) + endif() option(WITH_SNAPPY "build with SNAPPY" OFF) if(WITH_SNAPPY) find_package(snappy REQUIRED)