From 9bcc08df1aa20aad340307c4ac6f0d6884a56f4f Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Mon, 2 May 2011 04:36:47 +0200 Subject: [PATCH] Don't barf when Google PerfTools are not found, but simply disable it. Plus bug fix (missing NOT): in the case that USE_GOOGLE_PERFTOOLS is not set we DON'T want to build with Google TCMalloc. --- indra/cmake/GooglePerfTools.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index a5f957a20..0b483e5cf 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -25,9 +25,11 @@ else (STANDALONE) 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 (GOOGLE_PERFTOOLS_FOUND) + set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") +else (GOOGLE_PERFTOOLS_FOUND) + set(USE_GOOGLE_PERFTOOLS OFF) +endif (GOOGLE_PERFTOOLS_FOUND) # XXX Disable temporarily, until we have compilation issues on 64-bit # Etch sorted. @@ -41,7 +43,7 @@ else (USE_GOOGLE_PERFTOOLS) set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_GOOGLE_PERFTOOLS) -if (NOT(DISABLE_TCMALLOC OR USE_GOOGLE_PERFTOOLS)) +if (NOT(DISABLE_TCMALLOC OR NOT USE_GOOGLE_PERFTOOLS)) message(STATUS "Building with Google TCMalloc") set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1_) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})