Added FindJemalloc.cmake
This commit is contained in:
@ -38,7 +38,7 @@ find_package(MySQLClient)
|
|||||||
find_package(MySQL)
|
find_package(MySQL)
|
||||||
find_package(Pandoc)
|
find_package(Pandoc)
|
||||||
find_package(TCMalloc)
|
find_package(TCMalloc)
|
||||||
|
find_package(Jemalloc)
|
||||||
# You can find the variables set by this in the FindCURL.cmake file
|
# You can find the variables set by this in the FindCURL.cmake file
|
||||||
# which is a default module in CMake.
|
# which is a default module in CMake.
|
||||||
find_package(CURL)
|
find_package(CURL)
|
||||||
|
11
cmake/FindJemalloc.cmake
Normal file
11
cmake/FindJemalloc.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# this CMake file defines the following variables
|
||||||
|
# JEMALLOC_FOUND - Jemalloc was found
|
||||||
|
# JEMALLOC_LIBRARIES - Jemalloc library
|
||||||
|
find_library(JEMALLOC_LIBRARIES NAMES jemalloc libjemalloc.so.4 libjemalloc.so.4.2.2)
|
||||||
|
if(JEMALLOC_LIBRARIES)
|
||||||
|
set(JEMALLOC_FOUND TRUE CACHE INTERNAL "")
|
||||||
|
message(STATUS "Found libjemalloc: ${JEMALLOC_LIBRARIES}")
|
||||||
|
else()
|
||||||
|
set(JEMALLOC_FOUND FALSE CACHE INTERNAL "")
|
||||||
|
message(STATUS "Could not find libjemalloc, using system default malloc instead.")
|
||||||
|
endif()
|
Reference in New Issue
Block a user