about summary refs log tree commit diff homepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMartin Nowack <martin_nowack@tu-dresden.de>2017-10-12 22:27:27 +0200
committerAndrea Mattavelli <andreamattavelli@users.noreply.github.com>2017-10-26 15:50:55 +0100
commit9caaae0b1b6e52be3c7bb783f3a8be659a1a1869 (patch)
tree5d1d0c392ce9b9ab38bc897b72357fa81ef3f284 /CMakeLists.txt
parent7c91518d724c990003bb1bb3d6f36c5a59ebb6d7 (diff)
downloadklee-9caaae0b1b6e52be3c7bb783f3a8be659a1a1869.tar.gz
[cmake]Fix detection of non-standard path for tcmalloc
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6e349fa8..26c724c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,6 +370,8 @@ OPTION(ENABLE_TCMALLOC "Enable TCMalloc support" OFF)
 if (ENABLE_TCMALLOC)
   message(STATUS "TCMalloc support enabled")
   set(TCMALLOC_HEADER "gperftools/malloc_extension.h")
+  find_path(TCMALLOC_INCLUDE_DIR "${TCMALLOC_HEADER}")
+  set(CMAKE_REQUIRED_INCLUDES "${TCMALLOC_INCLUDE_DIR}")
   check_include_file_cxx("${TCMALLOC_HEADER}" HAVE_GPERFTOOLS_MALLOC_EXTENSION_H)
   if (${HAVE_GPERFTOOLS_MALLOC_EXTENSION_H})
     find_library(TCMALLOC_LIBRARIES