File: FindLibTCMalloc.cmake

package info (click to toggle)
swi-prolog 9.2.9%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 84,456 kB
  • sloc: ansic: 401,705; perl: 374,799; lisp: 9,080; cpp: 8,920; java: 5,525; sh: 3,282; javascript: 2,690; python: 2,655; ruby: 1,594; yacc: 845; makefile: 440; xml: 317; sed: 12; sql: 6
file content (23 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (4)
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} )