-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into include_macro_in_version
- Loading branch information
Showing
13 changed files
with
161 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
find_package(CURL) | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT CURL_FOUND) | ||
message(WARNING "Skipping http client/server example build: CURL not found") | ||
else() | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include | ||
${CMAKE_SOURCE_DIR}/ext/include ${CMAKE_SOURCE_DIR/}) | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include | ||
${CMAKE_SOURCE_DIR}/ext/include ${CMAKE_SOURCE_DIR/}) | ||
|
||
add_executable(http_client client.cc) | ||
add_executable(http_server server.cc) | ||
add_executable(http_client client.cc) | ||
add_executable(http_server server.cc) | ||
|
||
target_link_libraries( | ||
http_client ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span | ||
${CURL_LIBRARIES}) | ||
target_link_libraries( | ||
http_client ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span | ||
${CURL_LIBRARIES}) | ||
|
||
target_link_libraries( | ||
http_server ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span) | ||
endif() | ||
target_link_libraries( | ||
http_server ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(WITH_ZPAGES) | ||
add_subdirectory(zpages) | ||
endif() | ||
|
||
add_subdirectory(http/client/curl) | ||
if(WITH_HTTP_CLIENT_CURL) | ||
add_subdirectory(http/client/curl) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
find_package(CURL) | ||
if(CURL_FOUND) | ||
add_library( | ||
opentelemetry_http_client_curl http_client_factory_curl.cc | ||
http_client_curl.cc http_operation_curl.cc) | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set_target_properties(opentelemetry_http_client_curl | ||
PROPERTIES EXPORT_NAME http_client_curl) | ||
add_library( | ||
opentelemetry_http_client_curl http_client_factory_curl.cc | ||
http_client_curl.cc http_operation_curl.cc) | ||
|
||
if(TARGET CURL::libcurl) | ||
target_link_libraries( | ||
opentelemetry_http_client_curl | ||
PUBLIC opentelemetry_ext | ||
PRIVATE CURL::libcurl) | ||
else() | ||
target_include_directories(opentelemetry_http_client_curl | ||
INTERFACE "${CURL_INCLUDE_DIRS}") | ||
target_link_libraries( | ||
opentelemetry_http_client_curl | ||
PUBLIC opentelemetry_ext | ||
PRIVATE ${CURL_LIBRARIES}) | ||
endif() | ||
set_target_properties(opentelemetry_http_client_curl | ||
PROPERTIES EXPORT_NAME http_client_curl) | ||
|
||
install( | ||
TARGETS opentelemetry_http_client_curl | ||
EXPORT "${PROJECT_NAME}-target" | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
if(TARGET CURL::libcurl) | ||
target_link_libraries( | ||
opentelemetry_http_client_curl | ||
PUBLIC opentelemetry_ext | ||
PRIVATE CURL::libcurl) | ||
else() | ||
target_include_directories(opentelemetry_http_client_curl | ||
INTERFACE "${CURL_INCLUDE_DIRS}") | ||
target_link_libraries( | ||
opentelemetry_http_client_curl | ||
PUBLIC opentelemetry_ext | ||
PRIVATE ${CURL_LIBRARIES}) | ||
endif() | ||
|
||
install( | ||
TARGETS opentelemetry_http_client_curl | ||
EXPORT "${PROJECT_NAME}-target" | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include) | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
find_package(CURL) | ||
if(NOT CURL_FOUND) | ||
message(WARNING "Skipping example_w3c_tracecontext_test: CURL not found") | ||
else() | ||
add_executable(w3c_tracecontext_test main.cc) | ||
target_link_libraries( | ||
w3c_tracecontext_test | ||
PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span | ||
${CURL_LIBRARIES} nlohmann_json::nlohmann_json) | ||
if(nlohmann_json_clone) | ||
add_dependencies(w3c_tracecontext_test nlohmann_json::nlohmann_json) | ||
endif() | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include) | ||
|
||
add_executable(w3c_tracecontext_test main.cc) | ||
target_link_libraries( | ||
w3c_tracecontext_test | ||
PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace | ||
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span | ||
${CURL_LIBRARIES} nlohmann_json::nlohmann_json) | ||
if(nlohmann_json_clone) | ||
add_dependencies(w3c_tracecontext_test nlohmann_json::nlohmann_json) | ||
endif() |