From 04abb2b2ddc308ab03f55ea9a1e08b62667d6e39 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sun, 9 Apr 2017 11:15:35 -0700 Subject: [PATCH] FreeBSD only requires WITH_JEMALLOC, not the rest Summary: The compiler error: ``` /home/jenkins/workspace/ceph-master/src/rocksdb/db/db_impl.cc:20:10: fatal error: 'jemalloc/jemalloc.h' file not found ^ 1 error generated. ``` But is does compile with the `WITH_JEMALLOC` set. So ignore all the other settings. Closes https://github.com/facebook/rocksdb/pull/2118 Differential Revision: D4858387 Pulled By: yiwu-arbug fbshipit-source-id: 05b982969dcab53669a73a903641e71641c714e7 --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cd9c1ca0..924ec711f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,13 +47,15 @@ else() option(WITH_JEMALLOC "build with JeMalloc" OFF) if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") # FreeBSD has jemaloc as default malloc + # but it does not have all the jemalloc files in include/... set(WITH_JEMALLOC ON) - endif() - if(WITH_JEMALLOC) - find_package(JeMalloc REQUIRED) - add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE) - include_directories(${JEMALLOC_INCLUDE_DIR}) - endif() + else() + if(WITH_JEMALLOC) + find_package(JeMalloc REQUIRED) + add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE) + include_directories(${JEMALLOC_INCLUDE_DIR}) + endif() + endif() option(WITH_SNAPPY "build with SNAPPY" OFF) if(WITH_SNAPPY) find_package(snappy REQUIRED)