Add support for tcmalloc
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
8353181fd1
commit
5de8b3a8ee
1 changed files with 10 additions and 1 deletions
|
@ -32,9 +32,18 @@ if (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
|
|||
endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
|
||||
|
||||
find_path(GMP_INCLUDE_DIR NAMES gmp.h )
|
||||
find_library(GMP_LIBRARIES NAMES gmp libgmp )
|
||||
find_library(GMP_LIBRARIES NAMES gmp libgmp REQUIRED)
|
||||
message(STATUS "GMP: " ${GMP_LIBRARIES})
|
||||
|
||||
find_library(TCMALLOC_LIBRARY tcmalloc)
|
||||
if (${TCMALLOC_LIBRARY} MATCHES "TCMALLOC_LIBRARY-NOTFOUND")
|
||||
message("*** WARNING: failed to find tcmalloc")
|
||||
message("*** The (optional) tcmalloc library is available at: https://code.google.com/p/gperftools")
|
||||
else()
|
||||
message("Found tcmalloc")
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${TCMALLOC_LIBRARY})
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)
|
||||
mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)
|
||||
|
|
Loading…
Reference in a new issue