]>
Commit | Line | Data |
---|---|---|
1 | if(ALLOCATOR STREQUAL "tcmalloc") | |
2 | add_library(heap_profiler STATIC | |
3 | heap_profiler.cc) | |
4 | target_link_libraries(heap_profiler | |
5 | gperftools::tcmalloc) | |
6 | else() | |
7 | add_library(heap_profiler STATIC | |
8 | disabled_heap_profiler.cc) | |
9 | endif() | |
10 | ||
11 | option(WITH_PROFILER "build extra profiler binaries" OFF) | |
12 | ||
13 | if(WITH_PROFILER) | |
14 | find_package(gperftools REQUIRED profiler) | |
15 | add_library(cpu_profiler STATIC | |
16 | cpu_profiler.cc) | |
17 | target_link_libraries(cpu_profiler | |
18 | gperftools::profiler) | |
19 | else() | |
20 | add_library(cpu_profiler STATIC | |
21 | disabled_stubs.cc) | |
22 | endif() |