2014-06-23 22:32:32 +00:00
|
|
|
# - Find Tcmalloc
|
|
|
|
# Find the native Tcmalloc includes and library
|
|
|
|
#
|
|
|
|
# Tcmalloc_INCLUDE_DIR - where to find Tcmalloc.h, etc.
|
|
|
|
# Tcmalloc_LIBRARIES - List of libraries when using Tcmalloc.
|
|
|
|
# Tcmalloc_FOUND - True if Tcmalloc found.
|
|
|
|
|
2016-07-21 17:13:48 +00:00
|
|
|
find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h PATHS
|
2014-06-23 22:32:32 +00:00
|
|
|
/usr/include
|
|
|
|
/opt/local/include
|
2016-07-21 17:13:48 +00:00
|
|
|
/usr/local/include)
|
2014-06-23 22:32:32 +00:00
|
|
|
|
2016-07-21 17:13:48 +00:00
|
|
|
find_library(Tcmalloc_LIBRARY
|
|
|
|
NAMES tcmalloc_minimal tcmalloc
|
|
|
|
PATHS /lib /usr/lib /usr/local/lib /opt/local/lib)
|
2014-06-23 22:32:32 +00:00
|
|
|
|
2016-07-21 17:13:48 +00:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Tcmalloc
|
|
|
|
FOUND_VAR Tcmalloc_FOUND
|
|
|
|
REQUIRED_VARS Tcmalloc_INCLUDE_DIR Tcmalloc_LIBRARY)
|
2014-06-23 22:32:32 +00:00
|
|
|
|
2016-07-21 17:13:48 +00:00
|
|
|
if(Tcmalloc_FOUND)
|
|
|
|
set(Tcmalloc_LIBRARIES ${Tcmalloc_LIBRARY})
|
|
|
|
endif()
|
2014-06-23 22:32:32 +00:00
|
|
|
|
|
|
|
mark_as_advanced(
|
|
|
|
Tcmalloc_LIBRARY
|
2016-07-21 17:13:48 +00:00
|
|
|
Tcmalloc_INCLUDE_DIR)
|