File: FindTCmalloc.cmake

package info (click to toggle)
enblend-enfuse 4.2-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,756 kB
  • sloc: cpp: 24,275; sh: 4,319; perl: 1,124; makefile: 551; ansic: 505; lisp: 276
file content (32 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# - Find TCMALLOC
# Find the native TCMALLOC includes and library
#
#  TCMALLOC_INCLUDE_DIR - where to find tcmalloc.h etc.
#  TCMALLOC_LIBRARIES   - List of libraries when using tcmalloc.
#  TCMALLOC_FOUND       - True if tcmalloc found.

FIND_PATH(TCMALLOC_INCLUDE_DIR tcmalloc.h
  PATHS
    /usr/local/include
    /usr/include
    ${CMAKE_SYSTEM_INCLUDE_PATH}/gperftools
    ${CMAKE_INCLUDE_PATH}/gperftools
    ${SOURCE_BASE_DIR}/gperftools-2.0/src/windows/gperftools
)

find_library(TCMALLOC_LIBRARIES 
  NAMES tcmalloc tcmalloc_minimal libtcmalloc_minimal
  PATHS 
    ${SYSTEM_LIB_DIRS}
    ${SOURCE_BASE_DIR}/gperftools-2.0/x64/Release    
    ${SOURCE_BASE_DIR}/gperftools-2.0/Release    
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TCMALLOC DEFAULT_MSG 
                                  TCMALLOC_INCLUDE_DIR TCMALLOC_LIBRARIES)

MARK_AS_ADVANCED(
  TCMALLOC_LIBRARIES
  TCMALLOC_INCLUDE_DIR
  )