summaryrefslogtreecommitdiff
path: root/indra/cmake/GooglePerfTools.cmake
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
committerBryan O'Sullivan <bos@lindenlab.com>2008-06-02 21:14:31 +0000
commit9db949eec327df4173fde3de934a87bedb0db13c (patch)
treeaeffa0f0e68b1d2ceb74d460cbbd22652c9cd159 /indra/cmake/GooglePerfTools.cmake
parent419e13d0acaabf5e1e02e9b64a07648bce822b2f (diff)
svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers
Diffstat (limited to 'indra/cmake/GooglePerfTools.cmake')
-rw-r--r--indra/cmake/GooglePerfTools.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
new file mode 100644
index 0000000000..61a2631a08
--- /dev/null
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -0,0 +1,26 @@
+# -*- cmake -*-
+
+if (STANDALONE)
+ include(FindGooglePerfTools)
+else (STANDALONE)
+ if (LINUX)
+ set(TCMALLOC_LIBRARIES tcmalloc)
+ set(STACKTRACE_LIBRARIES stacktrace)
+ set(PROFILER_LIBRARIES profiler)
+ set(GOOGLE_PERFTOOLS_INCLUDE_DIR
+ ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
+ set(GOOGLE_PERFTOOLS_FOUND "YES")
+ endif (LINUX)
+endif (STANDALONE)
+
+if (GOOGLE_PERFTOOLS_FOUND)
+ set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
+endif (GOOGLE_PERFTOOLS_FOUND)
+
+if (USE_GOOGLE_PERFTOOLS)
+ set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
+ include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
+ set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES})
+else (USE_GOOGLE_PERFTOOLS)
+ set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
+endif (USE_GOOGLE_PERFTOOLS)