File: FindLibTCMalloc.cmake

package info (click to toggle)
swi-prolog 8.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 78,084 kB
  • sloc: ansic: 362,656; perl: 322,276; java: 5,451; cpp: 4,625; sh: 3,047; ruby: 1,594; javascript: 1,509; yacc: 845; xml: 317; makefile: 156; sed: 12; sql: 6
file content (23 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# - Try to find Google LibTCMalloc
# Once done this will define
#  LIBTCMALLOC_FOUND - System has tcmalloc (minimal)
#  LIBTCMALLOC_LIBRARIES - The libraries needed to use tcmalloc
#  LIBTCMALLOC_DEFINITIONS - Compiler switches required for using tcmalloc

find_package(PkgConfig)
pkg_check_modules(PC_LIBTCMALLOC_MINIMAL QUIET libtcmalloc_minimal)
set(LIBTCMALLOC_DEFINITIONS ${PC_LIBTCMALLOC_MINIMAL_CFLAGS_OTHER})

find_library(LIBTCMALLOC_LIBRARY NAMES tcmalloc_minimal
             HINTS ${PC_LIBTCMALLOC_MINIMAL_LIBDIR}
		   ${PC_LIBTCMALLOC_MINIMAL_LIBRARY_DIRS} )

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBTCMALLOC_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LibTCMalloc DEFAULT_MSG
                                  LIBTCMALLOC_LIBRARY)

mark_as_advanced(LIBTCMALLOC_LIBRARY )

set(LIBTCMALLOC_LIBRARIES ${LIBTCMALLOC_LIBRARY} )