cmake: add find jemalloc module

This commit is contained in:
Campbell Barton
2011-06-19 14:55:51 +00:00
parent 56c0f69071
commit a8d4c1f8a9
2 changed files with 71 additions and 6 deletions

View File

@@ -406,12 +406,10 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_MEM_JEMALLOC)
set(JEMALLOC /usr)
set(JEMALLOC_LIBRARIES jemalloc CACHE STRING "JeMalloc library")
set(JEMALLOC_LIBPATH ${JEMALLOC}/lib CACHE FILEPATH "JeMalloc library path")
# no use for this yet.
# set(JEMALLOC_INCLUDE_DIR ${JEMALLOC}/include CACHE FILEPATH "JeMalloc include path")
unset(JEMALLOC)
find_package(JeMalloc)
if(NOT JEMALLOC_FOUND)
set(WITH_MEM_JEMALLOC OFF)
endif()
endif()
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed