From 92d7bc2869a92c18eda336e8aad551a77d26d08c Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Tue, 23 Nov 2021 22:50:04 +0530 Subject: [PATCH] src/*/CMakeLists: update jaeger-base > jaeger_base jaeger-base encapsulated dependency for opentelemetry tracing libraries, when linked will provide support for tracing for the ceph target. Signed-off-by: Deepika Upadhyay --- src/CMakeLists.txt | 8 +++++--- src/crimson/CMakeLists.txt | 2 +- src/mon/CMakeLists.txt | 2 +- src/os/CMakeLists.txt | 4 ++-- src/rgw/CMakeLists.txt | 4 ++-- src/rgw/store/dbstore/CMakeLists.txt | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 442c5e9f643c2..adb82e1e1ec97 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -394,6 +394,7 @@ set(libcommon_files global/global_context.cc xxHash/xxhash.c common/error_code.cc + common/tracer.cc log/Log.cc mon/MonCap.cc mon/MonClient.cc @@ -433,6 +434,7 @@ if(WITH_JAEGER) build_opentelemetry() set(jaeger_base opentelemetry::libopentelemetry thrift::libthrift) add_dependencies(common-objs ${jaeger_base}) + target_link_libraries(common-objs ${jaeger_base}) endif() CHECK_C_COMPILER_FLAG("-fvar-tracking-assignments" HAS_VTA) @@ -496,7 +498,7 @@ if(WITH_DPDK) endif() if(WITH_JAEGER) - list(APPEND ceph_common_deps jaeger-base) + list(APPEND ceph_common_deps ${jaeger_base}) endif() if(WIN32) @@ -522,11 +524,11 @@ endif() add_library(common STATIC ${ceph_common_objs}) target_link_libraries(common ${ceph_common_deps}) -add_dependencies(common legacy-option-headers) +add_dependencies(common legacy-option-headers ${jaeger_base}) add_library(ceph-common SHARED ${ceph_common_objs}) target_link_libraries(ceph-common ${ceph_common_deps}) -add_dependencies(ceph-common legacy-option-headers) +add_dependencies(ceph-common legacy-option-headers ${jaeger_base}) # appease dpkg-shlibdeps set_target_properties(ceph-common PROPERTIES SOVERSION 2 diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index aa9c1b5330279..4508491407d91 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -136,7 +136,7 @@ set(crimson_common_deps if(WITH_JAEGER) include_directories(SYSTEM ${CMAKE_BINARY_DIR}/external/include) - list(APPEND crimson_common_deps jaeger-base) + list(APPEND crimson_common_deps ${jaeger_base}) endif() if(NOT WITH_SYSTEM_BOOST) diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt index 7b237c01c2f84..b7232551ccb03 100644 --- a/src/mon/CMakeLists.txt +++ b/src/mon/CMakeLists.txt @@ -42,5 +42,5 @@ target_link_libraries(mon heap_profiler fmt::fmt) if(WITH_JAEGER) - target_link_libraries(mon jaeger-base) + target_link_libraries(mon ${jaeger_base}) endif() diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index 387f150d27b76..f3040df7728a7 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -92,8 +92,8 @@ if(WITH_LTTNG) endif() if(WITH_JAEGER) - add_dependencies(os jaeger-base) - target_link_libraries(os jaeger-base) + add_dependencies(os ${jaeger_base}) + target_link_libraries(os ${jaeger_base}) endif() target_link_libraries(os kv) diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 0f1ddd9f5bcee..37e4573695466 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -243,8 +243,8 @@ if(WITH_LTTNG) endif() if(WITH_JAEGER) - add_dependencies(rgw_common jaeger-base) - target_link_libraries(rgw_common PUBLIC jaeger-base) + add_dependencies(rgw_common ${jaeger_base}) + target_link_libraries(rgw_common PUBLIC ${jaeger_base}) endif() if(WITH_RADOSGW_DBSTORE) diff --git a/src/rgw/store/dbstore/CMakeLists.txt b/src/rgw/store/dbstore/CMakeLists.txt index 39a233d90d8b1..143ede3c094c9 100644 --- a/src/rgw/store/dbstore/CMakeLists.txt +++ b/src/rgw/store/dbstore/CMakeLists.txt @@ -21,7 +21,7 @@ target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/inclu target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw") set(link_targets spawn) if(WITH_JAEGER) - list(APPEND link_targets jaeger-base) + list(APPEND link_targets ${jaeger_base}) endif() target_link_libraries(dbstore_lib PUBLIC ${link_targets}) -- 2.39.5