Skip to content

Commit

Permalink
fix(cmake): fixed jemalloc from system.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Dec 10, 2024
1 parent 1c71777 commit 5044f3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/modules/jemalloc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ if(JEMALLOC_INCLUDE)
# we already have JEMALLOC
elseif(NOT USE_BUNDLED_JEMALLOC)
find_path(JEMALLOC_INCLUDE jemalloc/jemalloc.h)
set(JEMALLOC_INCLUDE ${JEMALLOC_INCLUDE}/jemalloc)
if(BUILD_SHARED_LIBS)
set(JEMALLOC_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(JEMALLOC_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
find_library(JEMALLOC_LIB NAMES jemalloc${JEMALLOC_LIB_SUFFIX})
find_library(JEMALLOC_LIB NAMES libjemalloc${JEMALLOC_LIB_SUFFIX})
if(JEMALLOC_LIB)
message(STATUS "Found JEMALLOC: lib: ${JEMALLOC_LIB}")
message(STATUS "Found JEMALLOC: include: ${JEMALLOC_INCLUDE}, lib: ${JEMALLOC_LIB}")
else()
message(FATAL_ERROR "Couldn't find system jemalloc")
endif()
Expand Down

0 comments on commit 5044f3a

Please sign in to comment.