Added support for tcmalloc usage.

This commit is contained in:
Markus Makela
2015-04-20 17:52:50 +03:00
parent 060f68892d
commit b2cfa674b9
4 changed files with 24 additions and 0 deletions

11
cmake/FindTCMalloc.cmake Normal file
View File

@ -0,0 +1,11 @@
# this CMake file defines the following variables
# TCMALLOC_FOUND - TCMalloc was found
# TCMALLOC_LIBRARIES - TCMalloc library
find_library(TCMALLOC_LIBRARIES NAMES tcmalloc libtcmalloc.so.4 libtcmalloc.so.4.2.2)
if(TCMALLOC_LIBRARIES)
set(TCMALLOC_FOUND TRUE CACHE INTERNAL "")
message(STATUS "Found libtcmalloc: ${TCMALLOC_LIBRARIES}")
else()
set(TCMALLOC_FOUND FALSE CACHE INTERNAL "")
message(STATUS "Could not find libtcmalloc, using system default malloc instead.")
endif()