From f78982620a48dc76bbd3635300650d06ced24aab Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 26 Jan 2017 13:07:30 +0100 Subject: [PATCH] build: Disable jemalloc for FreeBSD. (#6007) jemalloc's README states: > jemalloc [is] the FreeBSD libc allocator since 2005. ... Modern jemalloc > releases continue to be integrated back into FreeBSD Since FreeBSD ships with jemalloc in some form, we don't need to require jemalloc there. Less risk, low cost. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65e4bbd672..7d978727bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,8 +342,8 @@ if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MA message(FATAL_ERROR "Sanitizers are only supported for Clang.") endif() -if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") - message(STATUS "detected OpenBSD; disabled jemalloc. #5318") +if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD") + message(STATUS "detected OpenBSD/FreeBSD; disabled jemalloc. #5318") option(ENABLE_JEMALLOC "enable jemalloc" OFF) else() option(ENABLE_JEMALLOC "enable jemalloc" ON)