Make FreeBSD more flexible, don't look for jemalloc unless we were

given a specific path for it.
This commit is contained in:
Craig Leres 2022-01-04 17:19:43 -08:00
parent 47a267130b
commit 8f2ac836f8

View file

@ -296,13 +296,19 @@ endif ()
if (ENABLE_JEMALLOC)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(JEMALLOC_FOUND true)
else ()
find_package(JeMalloc)
if (NOT JEMALLOC_FOUND)
message(FATAL_ERROR "Could not find requested JeMalloc")
if (DEFINED ${JEMALLOC_ROOT_DIR})
# Look for jemalloc at a specific path
find_package(JeMalloc)
else()
# jemalloc is in the base system
set(JEMALLOC_FOUND true)
endif()
else()
find_package(JeMalloc)
endif()
if (NOT JEMALLOC_FOUND)
message(FATAL_ERROR "Could not find requested JeMalloc")
endif()
endif ()