mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
3f6fd585f8
use find_package_handle_standard_args() and remove unused bits. Signed-off-by: Kefu Chai <kchai@redhat.com>
29 lines
762 B
CMake
29 lines
762 B
CMake
# - 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.
|
|
|
|
find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h PATHS
|
|
/usr/include
|
|
/opt/local/include
|
|
/usr/local/include)
|
|
|
|
find_library(Tcmalloc_LIBRARY
|
|
NAMES tcmalloc_minimal tcmalloc
|
|
PATHS /lib /usr/lib /usr/local/lib /opt/local/lib)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(Tcmalloc
|
|
FOUND_VAR Tcmalloc_FOUND
|
|
REQUIRED_VARS Tcmalloc_INCLUDE_DIR Tcmalloc_LIBRARY)
|
|
|
|
if(Tcmalloc_FOUND)
|
|
set(Tcmalloc_LIBRARIES ${Tcmalloc_LIBRARY})
|
|
endif()
|
|
|
|
mark_as_advanced(
|
|
Tcmalloc_LIBRARY
|
|
Tcmalloc_INCLUDE_DIR)
|