CodeCommitsIssuesPull requestsActionsInsightsSecurity
CLICKHOUSE-3023

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/Modules/FindGperftools.cmake

61lines · modecode

1# https://github.com/vast-io/vast/blob/master/cmake/FindGperftools.cmake
2
3# Tries to find Gperftools.
4#
5# Usage of this module as follows:
6#
7# find_package(Gperftools)
8#
9# Variables used by this module, they can change the default behaviour and need
10# to be set before calling find_package:
11#
12# Gperftools_ROOT_DIR Set this variable to the root installation of
13# Gperftools if the module has problems finding
14# the proper installation path.
15#
16# Variables defined by this module:
17#
18# GPERFTOOLS_FOUND System has Gperftools libs/headers
19# GPERFTOOLS_LIBRARIES The Gperftools libraries (tcmalloc & profiler)
20# GPERFTOOLS_INCLUDE_DIR The location of Gperftools headers
21
22find_library(GPERFTOOLS_TCMALLOC
23 NAMES tcmalloc
24 HINTS ${Gperftools_ROOT_DIR}/lib)
25
26find_library(GPERFTOOLS_TCMALLOC_MINIMAL
27 NAMES tcmalloc_minimal
28 HINTS ${Gperftools_ROOT_DIR}/lib)
29
30find_library(GPERFTOOLS_TCMALLOC_MINIMAL_DEBUG
31 NAMES tcmalloc_minimal_debug
32 HINTS ${Gperftools_ROOT_DIR}/lib)
33
34find_library(GPERFTOOLS_PROFILER
35 NAMES profiler
36 HINTS ${Gperftools_ROOT_DIR}/lib)
37
38find_library(GPERFTOOLS_TCMALLOC_AND_PROFILER
39 NAMES tcmalloc_and_profiler
40 HINTS ${Gperftools_ROOT_DIR}/lib)
41
42find_path(GPERFTOOLS_INCLUDE_DIR
43 NAMES gperftools/heap-profiler.h
44 HINTS ${Gperftools_ROOT_DIR}/include)
45
46set(GPERFTOOLS_LIBRARIES ${GPERFTOOLS_TCMALLOC_AND_PROFILER})
47
48include(FindPackageHandleStandardArgs)
49find_package_handle_standard_args(
50 Gperftools
51 DEFAULT_MSG
52 GPERFTOOLS_LIBRARIES
53 GPERFTOOLS_INCLUDE_DIR)
54
55mark_as_advanced(
56 Gperftools_ROOT_DIR
57 GPERFTOOLS_TCMALLOC
58 GPERFTOOLS_PROFILER
59 GPERFTOOLS_TCMALLOC_AND_PROFILER
60 GPERFTOOLS_LIBRARIES
61 GPERFTOOLS_INCLUDE_DIR)