Skip to content

Commit c214639

Browse files
authored
Find libpfm dependency in installed CMake configs (#1806)
Currently, Google Benchmark can be built and installed with support for libpfm, but this can cause a problem if that installation is later called upon by another CMake project. Indeed, while the installed CMake configuration script correctly identifies that it needs to link against libpfm, it doesn't try to find libpfm, meaning that the target will be unavailable. This commit fixes this potential configuration-time error by ensuring that an installation of Google Benchmark will correctly try to find the libpfm dependency when it is used elsewhere.
1 parent 4477525 commit c214639

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/Config.cmake.in

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ include (CMakeFindDependencyMacro)
44

55
find_dependency (Threads)
66

7+
if (@BENCHMARK_ENABLE_LIBPFM@)
8+
find_dependency (PFM)
9+
endif()
10+
711
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")

0 commit comments

Comments
 (0)