aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/GooglePerfTools.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/cmake/GooglePerfTools.cmake')
-rw-r--r--linden/indra/cmake/GooglePerfTools.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/linden/indra/cmake/GooglePerfTools.cmake b/linden/indra/cmake/GooglePerfTools.cmake
new file mode 100644
index 0000000..9b3eca0
--- /dev/null
+++ b/linden/indra/cmake/GooglePerfTools.cmake
@@ -0,0 +1,28 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (STANDALONE)
5 include(FindGooglePerfTools)
6else (STANDALONE)
7 use_prebuilt_binary(google)
8 if (LINUX)
9 set(TCMALLOC_LIBRARIES tcmalloc)
10 set(STACKTRACE_LIBRARIES stacktrace)
11 set(PROFILER_LIBRARIES profiler)
12 set(GOOGLE_PERFTOOLS_INCLUDE_DIR
13 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
14 set(GOOGLE_PERFTOOLS_FOUND "YES")
15 endif (LINUX)
16endif (STANDALONE)
17
18if (GOOGLE_PERFTOOLS_FOUND)
19 set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
20endif (GOOGLE_PERFTOOLS_FOUND)
21
22if (USE_GOOGLE_PERFTOOLS)
23 set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
24 include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
25 set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES})
26else (USE_GOOGLE_PERFTOOLS)
27 set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
28endif (USE_GOOGLE_PERFTOOLS)