Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cc_library(
name = "opentracing",
srcs = glob(["src/*.cpp"]),
hdrs = glob(["include/opentracing/*.h"]) + [
":include/opentracing/version.h",
],
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [":3rd_party_lib"],
)

genrule(
name = "generate_version_h",
srcs = glob([
"*",
"cmake/*",
"src/*",
]),
outs = ["include/opentracing/version.h"],
cmd = """
cmake -DBUILD_TESTING=OFF -L $$(dirname $(location :CMakeLists.txt))
mv include/opentracing/version.h $@
""",
)

cc_library(
name = "3rd_party_lib",
hdrs = glob(["3rd_party/include/**/*.hpp"]),
strip_include_prefix = "3rd_party/include",
)
1 change: 1 addition & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspace(name = "io_opentracing_cpp")
12 changes: 12 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
TEST_NAMES = [
"string_view_test",
"tracer_test",
"util_test",
"value_test",
]

[cc_test(
name = test_name,
srcs = [test_name + ".cpp"],
deps = ["//:opentracing"],
) for test_name in TEST_NAMES]