diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:44:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:44:33 +0000 |
commit | b196c6498d22e47bb9d0da0153068ec54eac7956 (patch) | |
tree | 1a994a492581e93224a7ee6455f5d4e9d2ec8e59 /BUILD.bazel | |
parent | Initial commit. (diff) | |
download | opentracing-cpp-upstream.tar.xz opentracing-cpp-upstream.zip |
Adding upstream version 1.6.0.upstream/1.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'BUILD.bazel')
-rw-r--r-- | BUILD.bazel | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..c57dc9f --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,41 @@ +cc_library( + name = "opentracing", + srcs = glob(["src/**/*.cpp"], exclude=["src/dynamic_load_unsupported.cpp", "src/dynamic_load_windows.cpp"]), + hdrs = glob(["include/opentracing/**/*.h"]) + [ + ":include/opentracing/config.h", + ":include/opentracing/version.h", + ], + strip_include_prefix = "include", + visibility = ["//visibility:public"], + deps = [ + "//3rd_party:expected", + "//3rd_party:variant", + ], + linkopts = [ + "-ldl", + ], +) + +genrule( + name = "generate_version_h", + srcs = glob([ + "*", + "cmake/*", + "src/**/*.cpp", + ]), + outs = [ + "include/opentracing/config.h", + "include/opentracing/version.h" + ], + cmd = """ + TEMP_DIR=$$(mktemp -d) + CONFIG_H_OUT=$${PWD}/$(location :include/opentracing/config.h) + VERSION_H_OUT=$${PWD}/$(location :include/opentracing/version.h) + OPENTRACING_ROOT=$$(dirname $${PWD}/$(location :CMakeLists.txt)) + cd $$TEMP_DIR + cmake -DBUILD_TESTING=OFF -DBUILD_MOCKTRACER=OFF -L $$OPENTRACING_ROOT + mv include/opentracing/config.h $$CONFIG_H_OUT + mv include/opentracing/version.h $$VERSION_H_OUT + rm -rf $$TEMP_DIR + """, +) |