Skip to content

Commit

Permalink
Add WITH_BENCHMARK (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jul 21, 2023
1 parent 7afa919 commit 15d5363
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions exporters/user_events/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,14 @@ if(BUILD_TESTING)
TEST_LIST user_events_logs_exporter_test)
endif()

find_package(benchmark CONFIG REQUIRED)
add_executable(user_events_logger_benchmark benchmark/logger_benchmark.cc)
target_link_libraries(
user_events_logger_benchmark benchmark::benchmark ${CMAKE_THREAD_LIBS_INIT}
${CMAKE_THREAD_LIBS_INIT} opentelemetry_logs
opentelemetry_exporter_user_events_logs)
if(WITH_BENCHMARK)
find_package(benchmark CONFIG REQUIRED)
add_executable(user_events_logger_benchmark benchmark/logger_benchmark.cc)
target_link_libraries(
user_events_logger_benchmark benchmark::benchmark ${CMAKE_THREAD_LIBS_INIT}
${CMAKE_THREAD_LIBS_INIT} opentelemetry_logs
opentelemetry_exporter_user_events_logs)
endif()

install(
TARGETS opentelemetry_exporter_user_events_logs
Expand Down

0 comments on commit 15d5363

Please sign in to comment.