Improve Bazel support: Switch to Bzlmod (#4584)

* Improve Bazel support: Switch to Bzlmod

Signed-off-by: Vertexwahn <julian.amann@tum.de>

* Update documentation

Signed-off-by: Vertexwahn <julian.amann@tum.de>

* Fix spelling

Signed-off-by: Vertexwahn <julian.amann@tum.de>

* Fix snippet filename error

Signed-off-by: Vertexwahn <julian.amann@tum.de>

---------

Signed-off-by: Vertexwahn <julian.amann@tum.de>
This commit is contained in:
Vertexwahn
2025-01-07 18:47:51 +01:00
committed by GitHub
parent 2e50d5b2f3
commit 0cb1241d5e
7 changed files with 43 additions and 15 deletions

View File

@@ -1,3 +1,20 @@
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_license//rules:license.bzl", "license")
package(
default_applicable_licenses = [":license"],
)
exports_files([
"LICENSE.MIT",
])
license(
name = "license",
license_kinds = ["@rules_license//licenses/spdx:MIT"],
license_text = "LICENSE.MIT",
)
cc_library(
name = "json",
hdrs = [
@@ -40,6 +57,7 @@ cc_library(
"include/nlohmann/detail/output/serializer.hpp",
"include/nlohmann/detail/string_concat.hpp",
"include/nlohmann/detail/string_escape.hpp",
"include/nlohmann/detail/string_utils.hpp",
"include/nlohmann/detail/value_t.hpp",
"include/nlohmann/json.hpp",
"include/nlohmann/json_fwd.hpp",
@@ -50,3 +68,12 @@ cc_library(
includes = ["include"],
visibility = ["//visibility:public"],
)
cc_library(
name = "singleheader-json",
hdrs = [
"single_include/nlohmann/json.hpp",
],
includes = ["single_include"],
visibility = ["//visibility:public"],
)