[llvm] r329261 - [llvm-exegesis] Check for libpfm headers.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 00:35:28 PDT 2018
Author: courbet
Date: Thu Apr 5 00:35:28 2018
New Revision: 329261
URL: http://llvm.org/viewvc/llvm-project?rev=329261&view=rev
Log:
[llvm-exegesis] Check for libpfm headers.
HAVE_LIBPFM is only defined if the libpfm headers are present.
Modified:
llvm/trunk/cmake/config-ix.cmake
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=329261&r1=329260&r2=329261&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Thu Apr 5 00:35:28 2018
@@ -87,7 +87,17 @@ if( NOT PURE_WINDOWS )
endif()
check_library_exists(dl dlopen "" HAVE_LIBDL)
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
- check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM)
+endif()
+
+# Check for libpfm.
+check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM_INITIALIZE)
+if(HAVE_LIBPFM_INITIALIZE)
+ check_include_file(perfmon/perf_event.h HAVE_PERFMON_PERF_EVENT_H)
+ check_include_file(perfmon/pfmlib.h HAVE_PERFMON_PFMLIB_H)
+ check_include_file(perfmon/pfmlib_perf_event.h HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+ if(HAVE_PERFMON_PERF_EVENT_H AND HAVE_PERFMON_PFMLIB_H AND HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+ set(HAVE_LIBPFM 1)
+ endif()
endif()
if(HAVE_LIBPTHREAD)
More information about the llvm-commits
mailing list