From 9caaae0b1b6e52be3c7bb783f3a8be659a1a1869 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Thu, 12 Oct 2017 22:27:27 +0200 Subject: [cmake]Fix detection of non-standard path for tcmalloc --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit 1.4.1