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 (ENABLE_JEMALLOC)
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(JEMALLOC_FOUND true) if (DEFINED ${JEMALLOC_ROOT_DIR})
else () # Look for jemalloc at a specific path
find_package(JeMalloc) find_package(JeMalloc)
else()
if (NOT JEMALLOC_FOUND) # jemalloc is in the base system
message(FATAL_ERROR "Could not find requested JeMalloc") set(JEMALLOC_FOUND true)
endif() endif()
else()
find_package(JeMalloc)
endif()
if (NOT JEMALLOC_FOUND)
message(FATAL_ERROR "Could not find requested JeMalloc")
endif() endif()
endif () endif ()