]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake,rgw: use jaeger-base target, as a dependency for building dbstore
authorDeepika Upadhyay <dupadhya@redhat.com>
Mon, 4 Oct 2021 08:10:48 +0000 (13:40 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Mon, 4 Oct 2021 08:22:49 +0000 (13:52 +0530)
* dbstore also has tracing dependencies and missing linking for libraries
* use `using` keyword in common/tracer.cc to silence unused method
  warnings
* log building of external project jaegertracing, opentracing into build
  file, (done to reduce external project build verbosity)

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
cmake/modules/BuildJaeger.cmake
cmake/modules/BuildOpenTracing.cmake
src/rgw/CMakeLists.txt
src/rgw/store/dbstore/CMakeLists.txt

index ffd301b7b08a5bd1722de9ee0ec26a6dd198a404..6a65a6bb42bd33c1874e3c83addc88a6f950bc38 100644 (file)
@@ -79,7 +79,7 @@ function(build_jaeger)
     INSTALL_COMMAND ${install_cmd}
     DEPENDS ${dependencies}
     BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/external/lib/libjaegertracing.so
-    )
+    LOG_BUILD ON)
 
   set_library_properties_for_external_project(opentracing::libopentracing
   opentracing)
index 5098709dbdb345194f673bb9431703c104830c93..07a1ea44d1c05f22ecfb135715ef9a0c488d46f9 100644 (file)
@@ -32,5 +32,5 @@ function(build_opentracing)
     BUILD_COMMAND ${make_cmd}
     INSTALL_COMMAND ${install_cmd}
     BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/external/lib/libopentracing.so
-    )
+    LOG_BUILD ON)
 endfunction()
index 58363d8d6f48938229bb7c28df4794c6bf99cf86..5acbd17a2dd07e8369a99a9262c0efd89374685a 100644 (file)
@@ -169,6 +169,9 @@ if(WITH_RADOSGW_DBSTORE)
   add_subdirectory(store/dbstore)
   list(APPEND librgw_common_srcs rgw_sal_dbstore.cc)
 endif()
+if(WITH_JAEGER)
+  list(APPEND librgw_common_srcs rgw_tracer.cc)
+endif()
 
 add_library(rgw_common STATIC ${librgw_common_srcs})
 
@@ -240,6 +243,7 @@ endif()
 
 if(WITH_JAEGER)
   add_dependencies(rgw_common jaeger-base)
+  target_link_libraries(rgw_common PUBLIC jaeger-base)
 endif()
 
 if(WITH_RADOSGW_DBSTORE)
index 12b641673c7a1259de5fec75b61f0d7e3cdba1aa..39a233d90d8b1851804b195c2b813363aee75b60 100644 (file)
@@ -19,7 +19,11 @@ set(dbstore_mgr_srcs
 add_library(dbstore_lib ${dbstore_srcs})
 target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/include")
 target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw")
-target_link_libraries(dbstore_lib PUBLIC spawn)
+set(link_targets spawn)
+if(WITH_JAEGER)
+  list(APPEND link_targets jaeger-base)
+endif()
+target_link_libraries(dbstore_lib PUBLIC ${link_targets})
 
 set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} dbstore_lib)