Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Enforce CMake to find PFM or fail when BENCHMARK_ENABLE_LIBPFM is ON #1702

Closed
romintomasetti opened this issue Nov 16, 2023 · 2 comments · Fixed by #1705
Closed

[FR] Enforce CMake to find PFM or fail when BENCHMARK_ENABLE_LIBPFM is ON #1702

romintomasetti opened this issue Nov 16, 2023 · 2 comments · Fixed by #1705

Comments

@romintomasetti
Copy link

Currently, setting BENCHMARK_ENABLE_LIBPFM to ON only tries to find PFM, but I think it should find it or fail since the user wants it.

benchmark/CMakeLists.txt

Lines 314 to 316 in 93a96a2

if (BENCHMARK_ENABLE_LIBPFM)
find_package(PFM)
endif()

Does the find_package simply need the REQUIRED keyword?

@romintomasetti romintomasetti changed the title [FR] Enforce CMake to find PFM or fail when BENCHMARK_ENABLE_LIBPFM is `ON [FR] Enforce CMake to find PFM or fail when BENCHMARK_ENABLE_LIBPFM is ON Nov 16, 2023
@dmah42
Copy link
Member

dmah42 commented Nov 16, 2023

yeah, i think that would do it. and it makes sense to me that if the user has requested it we should find it or fail.

@ananta
Copy link
Contributor

ananta commented Dec 1, 2023

@dmah42 added 😄

LebedevRI pushed a commit that referenced this issue Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants