添加jemalloc支持

This commit is contained in:
771730766@qq.com
2018-01-30 11:26:32 +08:00
parent 8c50aa6c66
commit ddd4f57fe8
2 changed files with 17 additions and 1 deletions

16
cmake/FindJEMALLOC.cmake Normal file
View File

@@ -0,0 +1,16 @@
find_path(JEMALLOC_INCLUDE_DIR
NAMES jemalloc/jemalloc.h
)
find_library(JEMALLOC_LIBRARY
NAMES jemalloc
)
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JEMALLOC DEFAULT_MSG JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)