Skip to content

Commit

Permalink
Move benchmark activation logic under ENABLE_TESTING
Browse files Browse the repository at this point in the history
This prevents accidental benchmarks activation if prometheus-cpp is used as a submodule of a larger project, that activates benchmarks library.
  • Loading branch information
mrbald authored Mar 17, 2024
1 parent 6c34b32 commit f55b102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ endif()

if(ENABLE_TESTING)
add_subdirectory(tests)
endif()

if(benchmark_FOUND)
add_subdirectory(benchmarks)
if(benchmark_FOUND)
add_subdirectory(benchmarks)
endif()
endif()

0 comments on commit f55b102

Please sign in to comment.