diff --git a/exporters/elasticsearch/CMakeLists.txt b/exporters/elasticsearch/CMakeLists.txt index 0c303db074..1bd671696b 100644 --- a/exporters/elasticsearch/CMakeLists.txt +++ b/exporters/elasticsearch/CMakeLists.txt @@ -3,6 +3,9 @@ include_directories(${CMAKE_SOURCE_DIR}/ext/include) add_library(opentelemetry_exporter_elasticsearch_logs src/es_log_exporter.cc) +target_link_libraries(opentelemetry_exporter_elasticsearch_logs + PUBLIC opentelemetry_trace http_client_curl) + if(BUILD_TESTING) add_executable(es_log_exporter_test test/es_log_exporter_test.cc) diff --git a/exporters/otlp/CMakeLists.txt b/exporters/otlp/CMakeLists.txt index 526a824da6..c2acd6b0ca 100644 --- a/exporters/otlp/CMakeLists.txt +++ b/exporters/otlp/CMakeLists.txt @@ -6,7 +6,8 @@ set_target_properties(opentelemetry_exporter_otprotocol target_link_libraries( opentelemetry_exporter_otprotocol - PUBLIC opentelemetry_trace opentelemetry_resources opentelemetry_proto) + PUBLIC opentelemetry_trace opentelemetry_resources opentelemetry_proto + protobuf::libprotobuf gRPC::grpc++) install( TARGETS opentelemetry_exporter_otprotocol @@ -29,7 +30,7 @@ if(BUILD_TESTING) add_executable(recordable_test test/recordable_test.cc) target_link_libraries( recordable_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} - opentelemetry_exporter_otprotocol protobuf::libprotobuf gRPC::grpc++) + opentelemetry_exporter_otprotocol) gtest_add_tests( TARGET recordable_test TEST_PREFIX exporter.otlp. @@ -44,13 +45,8 @@ if(BUILD_TESTING) endif() add_executable(otlp_exporter_test test/otlp_exporter_test.cc) target_link_libraries( - otlp_exporter_test - ${GTEST_BOTH_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${GMOCK_LIB} - opentelemetry_exporter_otprotocol - protobuf::libprotobuf - gRPC::grpc++) + otlp_exporter_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} + ${GMOCK_LIB} opentelemetry_exporter_otprotocol) gtest_add_tests( TARGET otlp_exporter_test TEST_PREFIX exporter.otlp. diff --git a/exporters/zipkin/CMakeLists.txt b/exporters/zipkin/CMakeLists.txt index 50c3103533..5f6f9887a6 100644 --- a/exporters/zipkin/CMakeLists.txt +++ b/exporters/zipkin/CMakeLists.txt @@ -20,6 +20,9 @@ endif() add_library(opentelemetry_exporter_zipkin_trace src/zipkin_exporter.cc src/recordable.cc) +target_link_libraries(opentelemetry_exporter_zipkin_trace + PUBLIC opentelemetry_trace http_client_curl) + install( TARGETS opentelemetry_exporter_zipkin_trace EXPORT "${PROJECT_NAME}-target" @@ -38,8 +41,7 @@ if(BUILD_TESTING) target_link_libraries( zipkin_recordable_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} - opentelemetry_exporter_zipkin_trace opentelemetry_resources - http_client_curl) + opentelemetry_exporter_zipkin_trace opentelemetry_resources) gtest_add_tests( TARGET zipkin_recordable_test diff --git a/sdk/src/common/core.cc b/sdk/src/common/core.cc index a8db9a0448..aaf013e2c6 100644 --- a/sdk/src/common/core.cc +++ b/sdk/src/common/core.cc @@ -2,6 +2,19 @@ #include "opentelemetry/version.h" #if defined(HAVE_ABSEIL) + +# if defined(__GNUC__) || defined(__GNUG__) +# ifndef __cdecl +// see https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html +// Intel x86 architecture specific calling conventions +# ifdef _M_IX86 +# define __cdecl __attribute__((__cdecl__)) +# else +# define __cdecl +# endif +# endif +# endif + namespace absl { namespace variant_internal