From 1e1fb8b53bde003ada2e2ef7d2ff0f63c34e42a5 Mon Sep 17 00:00:00 2001 From: WenTao Ou Date: Thu, 25 Nov 2021 10:06:15 +0800 Subject: [PATCH] Remove missing target in legacy prometheus (#1097) --- cmake/opentelemetry-cpp-config.cmake.in | 48 ++++++++++++------------- exporters/prometheus/CMakeLists.txt | 8 ++++- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/cmake/opentelemetry-cpp-config.cmake.in b/cmake/opentelemetry-cpp-config.cmake.in index 92578c5d57..34549d468f 100644 --- a/cmake/opentelemetry-cpp-config.cmake.in +++ b/cmake/opentelemetry-cpp-config.cmake.in @@ -20,30 +20,30 @@ # OPENTELEMETRY_VERSION - Version of opentelemetry-cpp. # # :: -# opentelemetry-cpp::api - Imported target of opentelemetry-cpp::api -# opentelemetry-cpp::sdk - Imported target of opentelemetry-cpp::sdk -# opentelemetry-cpp::ext - Imported target of opentelemetry-cpp::ext -# opentelemetry-cpp::version - Imported target of opentelemetry-cpp::version -# opentelemetry-cpp::common - Imported target of opentelemetry-cpp::common -# opentelemetry-cpp::trace - Imported target of opentelemetry-cpp::trace -# opentelemetry-cpp::metrics - Imported target of opentelemetry-cpp::metrics -# opentelemetry-cpp::logs - Imported target of opentelemetry-cpp::logs -# opentelemetry-cpp::in_memory_span_exporter - Imported target of opentelemetry-cpp::in_memory_span_exporter -# opentelemetry-cpp::otlp_recordable - Imported target of opentelemetry-cpp::otlp_recordable -# opentelemetry-cpp::otlp_grpc_exporter - Imported target of opentelemetry-cpp::otlp_grpc_exporter -# opentelemetry-cpp::otlp_grpc_log_exporter - Imported target of opentelemetry-cpp::otlp_grpc_log_exporter -# opentelemetry-cpp::otlp_http_client - Imported target of opentelemetry-cpp::otlp_http_client -# opentelemetry-cpp::otlp_http_exporter - Imported target of opentelemetry-cpp::otlp_http_exporter -# opentelemetry-cpp::otlp_http_log_exporter - Imported target of opentelemetry-cpp::otlp_http_log_exporter -# opentelemetry-cpp::ostream_log_exporter - Imported target of opentelemetry-cpp::ostream_log_exporter -# opentelemetry-cpp::ostream_metrics_exporter - Imported target of opentelemetry-cpp::ostream_metrics_exporter -# opentelemetry-cpp::ostream_span_exporter - Imported target of opentelemetry-cpp::ostream_span_exporter -# opentelemetry-cpp::prometheus_exporter - Imported target of opentelemetry-cpp::prometheus_exporter -# opentelemetry-cpp::elasticsearch_log_exporter - Imported target of opentelemetry-cpp::elasticsearch_log_exporter -# opentelemetry-cpp::etw_exporter - Imported target of opentelemetry-cpp::etw_exporter -# opentelemetry-cpp::jaeger_trace_exporter - Imported target of opentelemetry-cpp::jaeger_trace_exporter -# opentelemetry-cpp::zpages - Imported target of opentelemetry-cpp::zpages -# opentelemetry-cpp::http_client_curl - Imported target of opentelemetry-cpp::http_client_curl +# opentelemetry-cpp::api - Imported target of opentelemetry-cpp::api +# opentelemetry-cpp::sdk - Imported target of opentelemetry-cpp::sdk +# opentelemetry-cpp::ext - Imported target of opentelemetry-cpp::ext +# opentelemetry-cpp::version - Imported target of opentelemetry-cpp::version +# opentelemetry-cpp::common - Imported target of opentelemetry-cpp::common +# opentelemetry-cpp::trace - Imported target of opentelemetry-cpp::trace +# opentelemetry-cpp::metrics - Imported target of opentelemetry-cpp::metrics +# opentelemetry-cpp::logs - Imported target of opentelemetry-cpp::logs +# opentelemetry-cpp::in_memory_span_exporter - Imported target of opentelemetry-cpp::in_memory_span_exporter +# opentelemetry-cpp::otlp_recordable - Imported target of opentelemetry-cpp::otlp_recordable +# opentelemetry-cpp::otlp_grpc_exporter - Imported target of opentelemetry-cpp::otlp_grpc_exporter +# opentelemetry-cpp::otlp_grpc_log_exporter - Imported target of opentelemetry-cpp::otlp_grpc_log_exporter +# opentelemetry-cpp::otlp_http_client - Imported target of opentelemetry-cpp::otlp_http_client +# opentelemetry-cpp::otlp_http_exporter - Imported target of opentelemetry-cpp::otlp_http_exporter +# opentelemetry-cpp::otlp_http_log_exporter - Imported target of opentelemetry-cpp::otlp_http_log_exporter +# opentelemetry-cpp::ostream_log_exporter - Imported target of opentelemetry-cpp::ostream_log_exporter +# opentelemetry-cpp::ostream_metrics_exporter - Imported target of opentelemetry-cpp::ostream_metrics_exporter +# opentelemetry-cpp::ostream_span_exporter - Imported target of opentelemetry-cpp::ostream_span_exporter +# opentelemetry-cpp::prometheus_exporter_deprecated - Imported target of opentelemetry-cpp::prometheus_exporter_deprecated +# opentelemetry-cpp::elasticsearch_log_exporter - Imported target of opentelemetry-cpp::elasticsearch_log_exporter +# opentelemetry-cpp::etw_exporter - Imported target of opentelemetry-cpp::etw_exporter +# opentelemetry-cpp::jaeger_trace_exporter - Imported target of opentelemetry-cpp::jaeger_trace_exporter +# opentelemetry-cpp::zpages - Imported target of opentelemetry-cpp::zpages +# opentelemetry-cpp::http_client_curl - Imported target of opentelemetry-cpp::http_client_curl # # ============================================================================= diff --git a/exporters/prometheus/CMakeLists.txt b/exporters/prometheus/CMakeLists.txt index 3ef8e035ae..9b2c92ef73 100755 --- a/exporters/prometheus/CMakeLists.txt +++ b/exporters/prometheus/CMakeLists.txt @@ -26,7 +26,13 @@ target_include_directories( PUBLIC "$" "$") -set(PROMETHEUS_EXPORTER_TARGETS prometheus_exporter_deprecated pull core) +set(PROMETHEUS_EXPORTER_TARGETS prometheus_exporter_deprecated) +if(TARGET pull) + list(APPEND PROMETHEUS_EXPORTER_TARGETS pull) +endif() +if(TARGET core) + list(APPEND PROMETHEUS_EXPORTER_TARGETS core) +endif() target_link_libraries( prometheus_exporter_deprecated PUBLIC opentelemetry_metrics_deprecated prometheus-cpp::pull