Fix bugs in Tcmalloc detection.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
a7a5426ff5
commit
9d1266c972
2 changed files with 2 additions and 1 deletions
|
@ -60,6 +60,7 @@ set(EXTRA_LIBS ${EXTRA_LIBS} ${MPFR_LIBRARIES})
|
|||
# tcmalloc
|
||||
option(TCMALLOC "TCMALLOC" ON)
|
||||
if("${TCMALLOC}" MATCHES "ON")
|
||||
find_package(Tcmalloc)
|
||||
if(${TCMALLOC_FOUND})
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${TCMALLOC_LIBRARIES})
|
||||
message(STATUS "Using tcmalloc.")
|
||||
|
|
|
@ -13,7 +13,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCMALLOC DEFAULT_MSG TCMALLOC_INCLUDE_DIR TCMA
|
|||
if (TCMALLOC_FOUND)
|
||||
try_run(TC_CHECK TC_CHECK_BUILD
|
||||
${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
|
||||
${LEAN_SOURCE_DIR}/cmake/CheckTcmalloc.cc
|
||||
${LEAN_SOURCE_DIR}/cmake/Modules/CheckTcmalloc.cc
|
||||
CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${TCMALLOC_INCLUDE_DIR}
|
||||
-DLINK_LIBRARIES=${TCMALLOC_LIBRARIES}
|
||||
RUN_OUTPUT_VARIABLE TC_TRY_OUT)
|
||||
|
|
Loading…
Reference in a new issue