From 284a2e237960f48f34f0bb6167fdcf2bd3a027cf Mon Sep 17 00:00:00 2001 From: mrbald Date: Sun, 17 Mar 2024 13:06:00 +0100 Subject: [PATCH] Move benchmark activation logic under ENABLE_TESTING This prevents accidental benchmarks activation if prometheus-cpp is used as a submodule of a larger project, that activates benchmarks library. --- core/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 24f91fd0..98d5bfc6 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -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()