From eb070d5a724e1cec99600fa05ef288beb0151781 Mon Sep 17 00:00:00 2001
From: Russell Taylor <taylorrj@ornl.gov>
Date: Thu, 27 Jan 2011 21:59:44 +0000
Subject: [PATCH] Small correction. Re #2187.

---
 Code/Mantid/Framework/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/Mantid/Framework/CMakeLists.txt b/Code/Mantid/Framework/CMakeLists.txt
index c5aed23208c..c6f62086c85 100644
--- a/Code/Mantid/Framework/CMakeLists.txt
+++ b/Code/Mantid/Framework/CMakeLists.txt
@@ -44,8 +44,8 @@ configure_file ( ${PROJECT_SOURCE_DIR}/${HEADER_DIR}/MantidVersion.h.in
 set ( USE_TCMALLOC ON CACHE BOOL "Flag for replacing regular malloc with tcmalloc" )
 # Note that this is not mandatory, so no REQUIRED
 find_package ( Tcmalloc )
-# If not found, just carry on without it
-if ( TCMALLOC_FOUND )
+# If not found, or not wanted, just carry on without it
+if ( USE_TCMALLOC AND TCMALLOC_FOUND )
   set ( TCMALLOC_LIBRARY ${TCMALLOC_LIBRARIES} )
 endif ()
 
-- 
GitLab