-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract foo library into a separate library (#1043)
- Loading branch information
Showing
29 changed files
with
69 additions
and
282 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(foo_library) |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
cc_library( | ||
name = "common_foo_library", | ||
srcs = [ | ||
"foo_library.cc", | ||
], | ||
hdrs = [ | ||
"foo_library.h", | ||
], | ||
defines = ["BAZEL_BUILD"], | ||
deps = [ | ||
"//api", | ||
"//sdk:headers", | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_library(common_foo_library foo_library.h foo_library.cc) | ||
target_link_libraries(common_foo_library PUBLIC ${CMAKE_THREAD_LIBS_INIT} | ||
opentelemetry_api) |
File renamed without changes.
File renamed without changes.
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,10 +1,6 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/jaeger/include) | ||
|
||
add_library(jaeger_foo_library foo_library/foo_library.cc) | ||
target_link_libraries(jaeger_foo_library ${CMAKE_THREAD_LIBS_INIT} | ||
opentelemetry_api) | ||
|
||
add_executable(example_jaeger main.cc) | ||
target_link_libraries( | ||
example_jaeger ${CMAKE_THREAD_LIBS_INIT} jaeger_foo_library | ||
example_jaeger ${CMAKE_THREAD_LIBS_INIT} common_foo_library | ||
opentelemetry_trace opentelemetry_exporter_jaeger_trace) |
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,10 +1,7 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include | ||
${CMAKE_SOURCE_DIR}/exporters/memory/include) | ||
|
||
add_library(foo_multi_library foo_library/foo_library.cc) | ||
target_link_libraries(foo_multi_library opentelemetry_exporter_ostream_span | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
|
||
add_executable(example_multi_processor main.cc) | ||
target_link_libraries(example_multi_processor ${CMAKE_THREAD_LIBS_INIT} | ||
foo_multi_library opentelemetry_trace) | ||
target_link_libraries( | ||
example_multi_processor ${CMAKE_THREAD_LIBS_INIT} common_foo_library | ||
opentelemetry_trace opentelemetry_exporter_ostream_span) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 +1,17 @@ | ||
include_directories( | ||
${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto) | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/otlp/include) | ||
|
||
add_library(otlp_foo_library foo_library/foo_library.cc) | ||
target_link_libraries(otlp_foo_library ${CMAKE_THREAD_LIBS_INIT} | ||
opentelemetry_api) | ||
${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto | ||
${CMAKE_SOURCE_DIR}/exporters/otlp/include) | ||
|
||
if(WITH_OTLP_GRPC) | ||
add_executable(example_otlp_grpc grpc_main.cc) | ||
target_link_libraries( | ||
example_otlp_grpc ${CMAKE_THREAD_LIBS_INIT} otlp_foo_library | ||
example_otlp_grpc ${CMAKE_THREAD_LIBS_INIT} common_foo_library | ||
opentelemetry_trace opentelemetry_exporter_otlp_grpc gRPC::grpc++) | ||
endif() | ||
|
||
if(WITH_OTLP_HTTP) | ||
add_executable(example_otlp_http http_main.cc) | ||
target_link_libraries( | ||
example_otlp_http ${CMAKE_THREAD_LIBS_INIT} otlp_foo_library | ||
example_otlp_http ${CMAKE_THREAD_LIBS_INIT} common_foo_library | ||
opentelemetry_trace opentelemetry_exporter_otlp_http) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 +1,11 @@ | ||
cc_library( | ||
name = "foo_library", | ||
srcs = [ | ||
"foo_library/foo_library.cc", | ||
], | ||
hdrs = [ | ||
"foo_library/foo_library.h", | ||
], | ||
deps = [ | ||
"//api", | ||
], | ||
) | ||
|
||
cc_binary( | ||
name = "example_simple", | ||
srcs = [ | ||
"main.cc", | ||
], | ||
deps = [ | ||
":foo_library", | ||
"//api", | ||
"//examples/common/foo_library:common_foo_library", | ||
"//exporters/ostream:ostream_span_exporter", | ||
"//sdk/src/trace", | ||
], | ||
) |
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,9 +1,6 @@ | ||
include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include) | ||
|
||
add_library(foo_library foo_library/foo_library.cc) | ||
target_link_libraries(foo_library opentelemetry_exporter_ostream_span | ||
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) | ||
|
||
add_executable(example_simple main.cc) | ||
target_link_libraries(example_simple ${CMAKE_THREAD_LIBS_INIT} foo_library | ||
opentelemetry_trace) | ||
target_link_libraries( | ||
example_simple ${CMAKE_THREAD_LIBS_INIT} common_foo_library | ||
opentelemetry_trace opentelemetry_exporter_ostream_span) |
Oops, something went wrong.