Skip to content

Commit

Permalink
improve cmake: make openmp optional
Browse files Browse the repository at this point in the history
  • Loading branch information
JiakunYan committed Feb 26, 2025
1 parent 5af9b13 commit ebb3494
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
find_package(OpenMP REQUIRED)
find_package(OpenMP)
if(NOT OpenMP_CXX_FOUND)
message(WARNING "OpenMP not found. Disabling benchmarks.")
return()
endif()

find_package(PAPI)
option(USE_PAPI "Use PAPI to collect hardware counters" ${PAPI_FOUND})
configure_file(bench_config.h.in bench_config.h @ONLY)
Expand Down

0 comments on commit ebb3494

Please sign in to comment.