Merge pull request #4373 from skunkwerks/fix/freebsd-use-default-allocator

cmake: skip jemalloc on FreeBSD
This commit is contained in:
Markus Pilman 2021-03-01 14:49:01 -07:00 committed by GitHub
commit dd56261f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,12 +1,13 @@
add_library(jemalloc INTERFACE)
set(USE_JEMALLOC ON)
if(USE_SANITIZER OR WIN32)
# We don't want to use jemalloc on Windows
# Nor on FreeBSD, where jemalloc is the default system allocator
if(USE_SANITIZER OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD"))
set(USE_JEMALLOC OFF)
return()
endif()
# We don't want to use jemalloc on Windows
find_path(JEMALLOC_INCLUDE_DIR
NAMES
jemalloc/jemalloc.h