benchmark
benchmark copied to clipboard
[BUG] PFM_ROOT is not used when ENABLE_LIBPFM=ON
Describe the bug
The usual way to point cmake to a dependency via <Name>_ROOT
variable or via CMAKE_PREFIX_PATH
is not working.
System Which OS, compiler, and compiler version are you using:
- OS: Linux
- Compiler and version: GCC 13.0
To reproduce Steps to reproduce the behavior:
- pull main branch
- build/install libpfm4 anywhere except in standard system path
- cmake -D BENCHMARK_ENABLE_LIBPFM=ON -D PFM_ROOT=/the/path/to/libpfm4/
- cmake configure succeeds, but did not find libpfm, and thus the support is disabled.
Expected behavior
I expected to be able to inject PFM_ROOT to where I installed libpfm, but could not. Looking into it more, the custom FindPFM.cmake
module is not doing the right thing.