Add 'find-object/' from commit '635efcd6220cabc258b88c54b1ae4279035bbe31'
git-subtree-dir: find-object git-subtree-mainline:9bd639e88cgit-subtree-split:635efcd622
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# - Find Tcmalloc
|
||||
# Find the native Tcmalloc library
|
||||
#
|
||||
# Tcmalloc_LIBRARIES - List of libraries when using Tcmalloc.
|
||||
# Tcmalloc_FOUND - True if Tcmalloc found.
|
||||
|
||||
if (USE_TCMALLOC)
|
||||
set(Tcmalloc_NAMES tcmalloc)
|
||||
else ()
|
||||
set(Tcmalloc_NAMES tcmalloc_minimal tcmalloc)
|
||||
endif ()
|
||||
|
||||
find_library(Tcmalloc_LIBRARY NAMES ${Tcmalloc_NAMES})
|
||||
|
||||
if (Tcmalloc_LIBRARY)
|
||||
set(Tcmalloc_FOUND TRUE)
|
||||
set( Tcmalloc_LIBRARIES ${Tcmalloc_LIBRARY} )
|
||||
else ()
|
||||
set(Tcmalloc_FOUND FALSE)
|
||||
set( Tcmalloc_LIBRARIES )
|
||||
endif ()
|
||||
|
||||
if (Tcmalloc_FOUND)
|
||||
message(STATUS "Found Tcmalloc: ${Tcmalloc_LIBRARY}")
|
||||
else ()
|
||||
message(STATUS "Not Found Tcmalloc: ${Tcmalloc_LIBRARY}")
|
||||
if (Tcmalloc_FIND_REQUIRED)
|
||||
message(STATUS "Looked for Tcmalloc libraries named ${Tcmalloc_NAMES}.")
|
||||
message(FATAL_ERROR "Could NOT find Tcmalloc library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(Tcmalloc_LIBRARY)
|
||||
|
||||
Reference in New Issue
Block a user