Skip to content

Commit

Permalink
Add JSON C++ support - Bazel (open-telemetry#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
jajanet authored Jul 21, 2020
1 parent f73f5bf commit 2c8b0e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,12 @@ http_archive(
strip_prefix = "benchmark-1.5.0",
urls = ["https://github.com/google/benchmark/archive/v1.5.0.tar.gz"],
)

http_archive(
name = "github_nlohmann_json",
sha256 = "69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf",
urls = [
"https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip",
],
build_file = "//third_party:nlohmann_json.BUILD",
)
1 change: 1 addition & 0 deletions third_party/json/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports_files(["LICENSE"])
14 changes: 14 additions & 0 deletions third_party/json/nlohmann_json.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
licenses(["notice"]) # 3-Clause BSD

exports_files(["LICENSE.MIT"])

cc_library(
name = "json",
hdrs = glob([
"include/**/*.hpp",
]),
includes = ["include"],
visibility = ["//visibility:public"],
alwayslink = 1,
)

0 comments on commit 2c8b0e3

Please sign in to comment.