brintos

brintos / llvm-project-archived public Read only

0
0
Text · 959 B · 4c1ce93 Raw
29 lines · plain
1# If successful, the following variables will be defined:2# PFM_FOUND.3# PFM_LIBRARIES4# PFM_INCLUDE_DIRS5# the following target will be defined:6# PFM::libpfm7 8include(FeatureSummary)9include(FindPackageHandleStandardArgs)10 11set_package_properties(PFM PROPERTIES12                       URL http://perfmon2.sourceforge.net/13                       DESCRIPTION "A helper library to develop monitoring tools"14                       PURPOSE "Used to program specific performance monitoring events")15 16find_library(PFM_LIBRARY NAMES pfm)17find_path(PFM_INCLUDE_DIR NAMES perfmon/pfmlib.h)18 19find_package_handle_standard_args(PFM REQUIRED_VARS PFM_LIBRARY PFM_INCLUDE_DIR)20 21if (PFM_FOUND AND NOT TARGET PFM::libpfm)22    add_library(PFM::libpfm UNKNOWN IMPORTED)23    set_target_properties(PFM::libpfm PROPERTIES24        IMPORTED_LOCATION "${PFM_LIBRARY}"25        INTERFACE_INCLUDE_DIRECTORIES "${PFM_INCLUDE_DIR}")26endif()27 28mark_as_advanced(PFM_LIBRARY PFM_INCLUDE_DIR)29