From 450e3de56a38a66f67abe6874d42f7a1cf9675c3 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Mon, 11 Mar 2024 00:15:11 +0100 Subject: [PATCH] Define jsoncpp as Bazel module Signed-off-by: Matthieu MOREL --- .bazelrc | 1 + .gitignore | 3 +++ BUILD.bazel | 4 +++- MODULE.bazel | 10 ++++++++++ WORKSPACE | 1 + WORKSPACE.bzlmod | 0 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .bazelrc create mode 100644 MODULE.bazel create mode 100644 WORKSPACE create mode 100644 WORKSPACE.bzlmod diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 000000000..3ce91d272 --- /dev/null +++ b/.bazelrc @@ -0,0 +1 @@ +common --enable_bzlmod diff --git a/.gitignore b/.gitignore index 9682782fa..b91741d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ compile_commands.json # temps /version + +# Bazel +MODULE.bazel.lock diff --git a/BUILD.bazel b/BUILD.bazel index 6d7ac3da9..f0583a810 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + licenses(["unencumbered"]) # Public Domain or MIT exports_files(["LICENSE"]) @@ -14,9 +16,9 @@ cc_library( "include/json/allocator.h", "include/json/assertions.h", "include/json/config.h", - "include/json/json_features.h", "include/json/forwards.h", "include/json/json.h", + "include/json/json_features.h", "include/json/reader.h", "include/json/value.h", "include/json/version.h", diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 000000000..432a4a4dc --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,10 @@ +module( + name = "jsoncpp", + version = "0.0.0", +) + +bazel_dep( + name = "rules_cc", + version = "0.0.9", +) +# -- bazel_dep definitions -- # diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 000000000..5852516d3 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1 @@ +workspace(name = "jsoncpp") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 000000000..e69de29bb