about summary refs log tree commit diff homepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 041e4143..99508bb2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -186,6 +186,7 @@ include(CheckCXXSymbolExists)
 include(CheckIncludeFile)
 include(CheckIncludeFileCXX)
 include(CheckPrototypeDefinition)
+include(CMakePushCheckState)
 include("${CMAKE_SOURCE_DIR}/cmake/string_to_list.cmake")
 include("${CMAKE_SOURCE_DIR}/cmake/klee_component_add_cxx_flag.cmake")
 include("${CMAKE_SOURCE_DIR}/cmake/add_global_flag.cmake")
@@ -371,8 +372,10 @@ if (ENABLE_TCMALLOC)
   message(STATUS "TCMalloc support enabled")
   set(TCMALLOC_HEADER "gperftools/malloc_extension.h")
   find_path(TCMALLOC_INCLUDE_DIR "${TCMALLOC_HEADER}")
+  cmake_push_check_state()
   set(CMAKE_REQUIRED_INCLUDES "${TCMALLOC_INCLUDE_DIR}")
   check_include_file_cxx("${TCMALLOC_HEADER}" HAVE_GPERFTOOLS_MALLOC_EXTENSION_H)
+  cmake_pop_check_state()
   if (${HAVE_GPERFTOOLS_MALLOC_EXTENSION_H})
     find_library(TCMALLOC_LIBRARIES
       NAMES tcmalloc tcmalloc_minimal