[BUG] PFM_ROOT is not used when ENABLE_LIBPFM=ON
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
**Describe the bug**
The usual way to point cmake to a dependency via `_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:
1. pull main branch
2. build/install libpfm4 anywhere except in standard system path
3. cmake -D BENCHMARK_ENABLE_LIBPFM=ON -D PFM_ROOT=/the/path/to/libpfm4/
4. 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.
Contributor guide
Assessment
This issue has not been assessed yet.