diff --git a/MODULE.bazel b/MODULE.bazel index 3b6e540..4ad44bf 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,6 +8,11 @@ module(name = "bazel-compile-commands") bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support") bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "boost.core", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.io", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.json", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.process", version = "1.83.0.bcr.1") +bazel_dep(name = "boost.program_options", version = "1.83.0.bcr.1") bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "rules_apple", version = "3.16.0", repo_name = "build_bazel_rules_apple") diff --git a/WORKSPACE b/WORKSPACE index 72d5898..b23079f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,17 +2,6 @@ workspace(name = "bazel-compile-commands") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -_RULES_BOOST_COMMIT = "c649f6cd9cb8ca284d261890cdd9d75ec486861d" - -http_archive( - name = "com_github_nelhage_rules_boost", - sha256 = "70304cb09bd7529b8f45195f79a4c4070c1d75fe7dd3cc8f2f263ec2f12c12a3", - strip_prefix = "rules_boost-{}".format(_RULES_BOOST_COMMIT), - urls = [ - "https://github.com/nelhage/rules_boost/archive/{}.tar.gz".format(_RULES_BOOST_COMMIT), - ], -) - http_archive( name = "mgred_rules_pandoc", sha256 = "0ee76dc7403d40de7946e6b884f3e868e72f2d7ba172edfc828bfb50fd5baf04", @@ -20,10 +9,6 @@ http_archive( url = "https://github.com/mgred/rules_pandoc/releases/download/v0.2.0/rules_pandoc-v0.2.0.tar.gz", ) -load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps") - -boost_deps() - load("@mgred_rules_pandoc//pandoc:repositories.bzl", "LATEST_PANDOC_VERSION", "pandoc_register_toolchains", "rules_pandoc_dependencies") rules_pandoc_dependencies() diff --git a/bcc/BUILD b/bcc/BUILD index a89b3f9..24ebdb5 100644 --- a/bcc/BUILD +++ b/bcc/BUILD @@ -45,6 +45,15 @@ copy_file( is_executable = True, ) +cc_library( + name = "boost_json", + srcs = ["boost_json.cpp"], + defines = ["BOOST_JSON_NO_LIB"], + deps = [ + "@boost.json", + ], +) + cc_proto_library( name = "analysis", deps = ["@io_bazel//src/main/protobuf:analysis_v2_proto"], @@ -67,8 +76,8 @@ cc_library( defines = ["BOOST_PROCESS_USE_STD_FS=1"], deps = [ ":analysis", - "@boost//:json", - "@boost//:process", + ":boost_json", + "@boost.process", ], ) @@ -79,11 +88,11 @@ cc_library( deps = [ ":analysis", ":artifacts", + ":boost_json", ":dep_set_of_files", ":path_fragments", ":replacements", - "@boost//:io", - "@boost//:json", + "@boost.io", ], ) @@ -104,7 +113,7 @@ cc_library( deps = [ ":analysis", ":artifacts", - "@boost//:core", + "@boost.core", ], ) @@ -117,8 +126,8 @@ cc_library( ], defines = ["BOOST_PROCESS_USE_STD_FS=1"], deps = [ - "@boost//:process", - "@boost//:program_options", + "@boost.process", + "@boost.program_options", ], ) @@ -138,7 +147,7 @@ cc_library( defines = ["BOOST_PROCESS_USE_STD_FS=1"], deps = [ ":replacements", - "@boost//:process", + "@boost.process", ], ) diff --git a/bcc/boost_json.cpp b/bcc/boost_json.cpp new file mode 100644 index 0000000..9627f94 --- /dev/null +++ b/bcc/boost_json.cpp @@ -0,0 +1 @@ +#include diff --git a/tests/BUILD b/tests/BUILD index 9a67de8..0ba3b04 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -8,9 +8,9 @@ cc_test( ], defines = ["BOOST_PROCESS_USE_STD_FS=1"], deps = [ + "//bcc:boost_json", "@bazel_tools//tools/cpp/runfiles", - "@boost//:json", - "@boost//:process", + "@boost.process", "@com_google_googletest//:gtest_main", ], )