File: CMakeLists.txt

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (55 lines) | stat: -rw-r--r-- 1,780 bytes parent folder | download | duplicates (3)
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
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

include(GoogleTest)

add_library(component_a STATIC component_a.cc)
target_link_libraries(component_a opentelemetry_api)

add_library(component_b STATIC component_b.cc)
target_link_libraries(component_b opentelemetry_api)

add_library(component_c SHARED component_c.cc)
set_target_properties(component_c PROPERTIES CXX_VISIBILITY_PRESET default)
target_link_libraries(component_c opentelemetry_api)

add_library(component_d SHARED component_d.cc)
set_target_properties(component_d PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_link_libraries(component_d opentelemetry_api)

add_library(component_e SHARED component_e.cc)
set_target_properties(component_e PROPERTIES CXX_VISIBILITY_PRESET default)
target_link_libraries(component_e opentelemetry_api)

add_library(component_f SHARED component_f.cc)
set_target_properties(component_f PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_link_libraries(component_f opentelemetry_api)

add_library(component_g SHARED component_g.cc)
set_target_properties(component_g PROPERTIES CXX_VISIBILITY_PRESET default)
target_link_libraries(component_g opentelemetry_api)

add_library(component_h SHARED component_h.cc)
set_target_properties(component_h PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_link_libraries(component_h opentelemetry_api)

add_executable(singleton_test singleton_test.cc)

# Not linking with component_g and component_h on purpose
target_link_libraries(
  singleton_test
  component_a
  component_b
  component_c
  component_d
  component_e
  component_f
  ${GTEST_BOTH_LIBRARIES}
  ${CMAKE_THREAD_LIBS_INIT}
  ${CMAKE_DL_LIBS}
  opentelemetry_api)

gtest_add_tests(
  TARGET singleton_test
  TEST_PREFIX singleton.
  TEST_LIST singleton_test)