From 3eb6c29aa5d80a65e8b90db38dbd532c6fb5acd8 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Sat, 18 Jun 2022 16:10:58 +0530 Subject: [PATCH] cmake: remove git fetch and use submodule for building opentelemetry lib We were using git fetch and an unofficial remote to fetch opentelemetry-cpp, as it needed additional patch to include boost headers, with the merge of open-telemetry/opentelemetry-cpp#1100 open-telemetry/opentelemetry-cpp#1020 we do not require to maintain our own patched version. Also, we were using git fetch as a temporary change, now that tracing is always on, it should be right time to adapt to using opentelemetry-cpp as a submodule. This removes compile time fetch for opentelemetry-cpp instead use official opentelemetry-cpp lib as a submodule. Signed-off-by: Deepika Upadhyay --- cmake/modules/BuildOpentelemetry.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cmake/modules/BuildOpentelemetry.cmake b/cmake/modules/BuildOpentelemetry.cmake index 1bbdf870c17ae..ba2edaa09329d 100644 --- a/cmake/modules/BuildOpentelemetry.cmake +++ b/cmake/modules/BuildOpentelemetry.cmake @@ -6,7 +6,7 @@ function(target_create _target _lib) endfunction() function(build_opentelemetry) - set(opentelemetry_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/opentelemetry-cpp") + set(opentelemetry_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/jaegertracing/opentelemetry-cpp") set(opentelemetry_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/opentelemetry-cpp") set(opentelemetry_cpp_targets opentelemetry_trace opentelemetry_exporter_jaeger_trace) set(opentelemetry_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON @@ -20,7 +20,7 @@ function(build_opentelemetry) ${opentelemetry_BINARY_DIR}/sdk/src/resource/libopentelemetry_resources.a ${opentelemetry_BINARY_DIR}/sdk/src/common/libopentelemetry_common.a ${opentelemetry_BINARY_DIR}/exporters/jaeger/libopentelemetry_exporter_jaeger_trace.a - ${opentelemetry_BINARY_DIR}/ext/src/http/client/curl/libhttp_client_curl.a + ${opentelemetry_BINARY_DIR}/ext/src/http/client/curl/libopentelemetry_http_client_curl.a ${CURL_LIBRARIES} ) set(opentelemetry_include_dir ${opentelemetry_SOURCE_DIR}/api/include/ @@ -48,11 +48,7 @@ function(build_opentelemetry) endif() include(ExternalProject) - ExternalProject_Add( - opentelemetry-cpp - GIT_REPOSITORY https://github.com/ideepika/opentelemetry-cpp.git - GIT_TAG wip-ceph - GIT_SHALLOW 1 + ExternalProject_Add(opentelemetry-cpp SOURCE_DIR ${opentelemetry_SOURCE_DIR} PREFIX "opentelemetry-cpp" CMAKE_ARGS ${opentelemetry_CMAKE_ARGS} @@ -74,7 +70,7 @@ function(build_opentelemetry) target_create("opentelemetry_exporter_jaeger_trace" "exporters/jaeger/libopentelemetry_exporter_jaeger_trace.a") target_create("http_client_curl" - "ext/src/http/client/curl/libhttp_client_curl.a") + "ext/src/http/client/curl/libopentelemetry_http_client_curl.a") # will do all linking and path setting fake include path for # interface_include_directories since this happens at build time