cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
cmake/Modules/FindJeMalloc.cmake
46lines · modecode
9 years ago
| 1 | # https://github.com/bro/cmake/blob/master/FindJeMalloc.cmake |
| 2 | # |
| 3 | # - Try to find jemalloc headers and libraries. |
| 4 | # |
| 5 | # Usage of this module as follows: |
| 6 | # |
| 7 | # find_package(JeMalloc) |
| 8 | # |
| 9 | # Variables used by this module, they can change the default behaviour and need |
| 10 | # to be set before calling find_package: |
| 11 | # |
| 12 | # JEMALLOC_ROOT_DIR Set this variable to the root installation of |
| 13 | # jemalloc if the module has problems finding |
| 14 | # the proper installation path. |
| 15 | # |
| 16 | # Variables defined by this module: |
| 17 | # |
| 18 | # JEMALLOC_FOUND System has jemalloc libs/headers |
| 19 | # JEMALLOC_LIBRARIES The jemalloc library/libraries |
| 20 | # JEMALLOC_INCLUDE_DIR The location of jemalloc headers |
| 21 | |
| 22 | find_path(JEMALLOC_ROOT_DIR |
| 23 | NAMES include/jemalloc/jemalloc.h |
| 24 | ) |
| 25 | |
| 26 | find_library(JEMALLOC_LIBRARIES |
| 27 | NAMES jemalloc |
| 28 | HINTS ${JEMALLOC_ROOT_DIR}/lib |
| 29 | ) |
| 30 | |
| 31 | find_path(JEMALLOC_INCLUDE_DIR |
| 32 | NAMES jemalloc/jemalloc.h |
| 33 | HINTS ${JEMALLOC_ROOT_DIR}/include |
| 34 | ) |
| 35 | |
| 36 | include(FindPackageHandleStandardArgs) |
| 37 | find_package_handle_standard_args(JeMalloc DEFAULT_MSG |
| 38 | JEMALLOC_LIBRARIES |
| 39 | JEMALLOC_INCLUDE_DIR |
| 40 | ) |
| 41 | |
| 42 | mark_as_advanced( |
| 43 | JEMALLOC_ROOT_DIR |
| 44 | JEMALLOC_LIBRARIES |
| 45 | JEMALLOC_INCLUDE_DIR |
| 46 | ) |