File: CMakeLists.txt

package info (click to toggle)
opentelemetry-cpp 1.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 8,744 kB
  • sloc: cpp: 79,029; sh: 1,640; makefile: 43; python: 31
file content (77 lines) | stat: -rw-r--r-- 2,833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

add_library(metrics_common_test_utils common.cc)
target_link_libraries(metrics_common_test_utils opentelemetry_metrics)

foreach(
  testname
  meter_provider_sdk_test
  meter_test
  view_registry_test
  aggregation_test
  sum_aggregation_test
  histogram_aggregation_test
  attributes_processor_test
  attributes_hashmap_test
  base2_exponential_histogram_indexer_test
  circular_buffer_counter_test
  cardinality_limit_test
  histogram_test
  sync_metric_storage_counter_test
  sync_metric_storage_gauge_test
  sync_metric_storage_histogram_test
  sync_metric_storage_up_down_counter_test
  async_metric_storage_test
  multi_metric_storage_test
  observer_result_test
  sync_instruments_test
  async_instruments_test
  metric_reader_test
  observable_registry_test
  periodic_exporting_metric_reader_test
  instrument_metadata_validator_test)
  add_executable(${testname} "${testname}.cc")
  target_link_libraries(
    ${testname} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
    metrics_common_test_utils opentelemetry_resources)
  gtest_add_tests(
    TARGET ${testname}
    TEST_PREFIX metrics.
    TEST_LIST ${testname})
endforeach()

if(WITH_BENCHMARK)
  add_executable(attributes_processor_benchmark
                 attributes_processor_benchmark.cc)
  target_link_libraries(attributes_processor_benchmark benchmark::benchmark
                        ${CMAKE_THREAD_LIBS_INIT} opentelemetry_common)

  add_executable(attributes_hashmap_benchmark attributes_hashmap_benchmark.cc)
  target_link_libraries(attributes_hashmap_benchmark benchmark::benchmark
                        ${CMAKE_THREAD_LIBS_INIT} opentelemetry_common)

  add_executable(base2_exponential_histogram_indexer_benchmark
                 base2_exponential_histogram_indexer_benchmark.cc)
  target_link_libraries(
    base2_exponential_histogram_indexer_benchmark benchmark::benchmark
    opentelemetry_metrics ${CMAKE_THREAD_LIBS_INIT} opentelemetry_common)

  add_executable(histogram_aggregation_benchmark
                 histogram_aggregation_benchmark.cc)
  target_link_libraries(
    histogram_aggregation_benchmark benchmark::benchmark
    ${CMAKE_THREAD_LIBS_INIT} metrics_common_test_utils opentelemetry_common
    opentelemetry_resources)

  add_executable(measurements_benchmark measurements_benchmark.cc)
  target_link_libraries(
    measurements_benchmark benchmark::benchmark opentelemetry_metrics
    opentelemetry_resources ${CMAKE_THREAD_LIBS_INIT} opentelemetry_common)
  add_executable(sum_aggregation_benchmark sum_aggregation_benchmark.cc)
  target_link_libraries(
    sum_aggregation_benchmark benchmark::benchmark ${CMAKE_THREAD_LIBS_INIT}
    metrics_common_test_utils opentelemetry_common opentelemetry_resources)
endif()

add_subdirectory(exemplar)