Skip to content

Commit fd1508e

Browse files
committed
upgrade to bazel 8 and bzlmod
1 parent dc05565 commit fd1508e

File tree

5 files changed

+776
-3
lines changed

5 files changed

+776
-3
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
common --check_direct_dependencies=off
2+
common --noincompatible_disallow_empty_glob

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.0
1+
8.0.1

BUILD

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ exports_files(["LICENSE"])
44

55
cc_library(
66
name = "common",
7-
srcs = glob(["common/*.cpp"], exclude=["common/loglevel.cpp", "common/loglevel_util.cpp"]),
7+
srcs = glob(
8+
["common/*.cpp"],
9+
["common/loglevel.cpp", "common/loglevel_util.cpp"]
10+
),
811
hdrs = glob([
912
"common/*.h",
1013
"common/*.hpp",
@@ -16,7 +19,14 @@ cc_library(
1619
includes = [
1720
"common",
1821
],
19-
linkopts = ["-lpthread -lhiredis -lnl-genl-3 -lnl-nf-3 -lnl-route-3 -lnl-3 -lzmq -lboost_serialization -luuid -lyang"],
22+
# deps = [
23+
# "@boost.algorithm",
24+
# "@boost.serialization",
25+
# "@nlohmann_json//:json",
26+
# "@libuuid//:libuuid",
27+
# "@swig//:swig",
28+
# ],
29+
linkopts = ["-lpthread -lhiredis -lnl-genl-3 -lnl-nf-3 -lnl-route-3 -lnl-3 -lzmq -luuid -lyang"],
2030
visibility = ["//visibility:public"],
2131
)
2232

MODULE.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module(name = "sonic-swss-common")
2+
3+
bazel_dep(name = "googletest", version = "1.11.0", repo_name = "com_google_googletest")
4+
bazel_dep(name = "glog", version = "0.5.0", repo_name = "com_github_google_glog")
5+
6+
# bazel_dep(name = "nlohmann_json", version = "3.12.0")
7+
# bazel_dep(name = "boost.algorithm", version = "1.87.0")
8+
# bazel_dep(name = "boost.serialization", version = "1.87.0")
9+
# bazel_dep(name = "libuuid", version = "2.39.3.bcr.1")
10+
# bazel_dep(name = "libzmq", version = "4.3.5.bcr.3")
11+
# bazel_dep(name = "swig", version = "4.3.0")
12+
# bazel_dep(name = "abseil-cpp", version = "20210324.2")
13+
# bazel_dep(name = "gflags", version = "2.2.2")

0 commit comments

Comments
 (0)