diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-19 18:55:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-19 18:55:51 +0400 |
commit | a8d4c1f8a918474cb4047e244f069896df00a12d (patch) | |
tree | b949d0fb9e12a220b025d55ed78cc3ee6d0a8eee /CMakeLists.txt | |
parent | 56c0f69071804192d127690936e88b92fb0935a2 (diff) |
cmake: add find jemalloc module
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ff7b7eaac2f..2d6d4258521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 |