File: FindLibTCMalloc.cmake

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; 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} )