source: icGREP/icgrep-devel/icgrep/cmake/FindPAPI.cmake @ 5023

Last change on this file since 5023 was 4919, checked in by nmedfort, 4 years ago

Work on lowering + some timing and papi information that will be cleaned up later.

File size: 1.1 KB
Line 
1# Try to find PAPI headers and libraries.
2#
3# Usage of this module as follows:
4#
5#     find_package(PAPI)
6#
7# Variables used by this module, they can change the default behaviour and need
8# to be set before calling find_package:
9#
10#  PAPI_PREFIX         Set this variable to the root installation of
11#                      libpapi if the module has problems finding the
12#                      proper installation path.
13#
14# Variables defined by this module:
15#
16#  PAPI_FOUND              System has PAPI libraries and headers
17#  PAPI_LIBRARIES          The PAPI library
18#  PAPI_INCLUDE_DIRS       The location of PAPI headers
19
20find_path(PAPI_PREFIX
21    NAMES include/papi.h
22)
23
24find_library(PAPI_LIBRARIES
25    # Pick the static library first for easier run-time linking.
26    NAMES libpapi.a papi
27    HINTS ${PAPI_PREFIX}/lib ${HILTIDEPS}/lib
28)
29
30find_path(PAPI_INCLUDE_DIRS
31    NAMES papi.h
32    HINTS ${PAPI_PREFIX}/include ${HILTIDEPS}/include
33)
34
35include(FindPackageHandleStandardArgs)
36find_package_handle_standard_args(PAPI DEFAULT_MSG
37    PAPI_LIBRARIES
38    PAPI_INCLUDE_DIRS
39)
40
41mark_as_advanced(
42    PAPI_PREFIX_DIRS
43    PAPI_LIBRARIES
44    PAPI_INCLUDE_DIRS
45)
Note: See TracBrowser for help on using the repository browser.