Skip to content

Commit

Permalink
Port to Bzlmod
Browse files Browse the repository at this point in the history
  • Loading branch information
Vertexwahn committed Jun 8, 2024
1 parent 1aba1d7 commit 6a00c67
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 24 deletions.
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags")
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True, repo_name = "com_github_google_googletest")
bazel_dep(name = "gflags", version = "2.2.2")
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True)
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ your ``WORKSPACE`` file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_github_gflags_gflags",
name = "gflags",
sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf",
strip_prefix = "gflags-2.2.2",
urls = ["https://github.com/gflags/gflags/archive/v2.2.2.tar.gz"],
Expand Down
18 changes: 0 additions & 18 deletions WORKSPACE

This file was deleted.

1 change: 1 addition & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# WORKSPACE marker file needed by Bazel
2 changes: 1 addition & 1 deletion bazel/example/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ cc_test(
srcs = ["main.cc"],
deps = [
"//:glog",
"@com_github_gflags_gflags//:gflags",
"@gflags//:gflags",
],
)
4 changes: 2 additions & 2 deletions bazel/glog.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def glog_library(with_gflags = 1, **kwargs):
"src/windows/port.h",
]

gflags_deps = ["@com_github_gflags_gflags//:gflags"] if with_gflags else []
gflags_deps = ["@gflags//:gflags"] if with_gflags else []

final_lib_defines = select({
# GLOG_EXPORT is normally set by export.h, but that's not
Expand Down Expand Up @@ -259,7 +259,7 @@ def glog_library(with_gflags = 1, **kwargs):
copts = final_lib_copts + test_only_copts,
deps = gflags_deps + [
":glog",
"@com_github_google_googletest//:gtest",
"@googletest//:gtest",
],
**kwargs
)
Expand Down

0 comments on commit 6a00c67

Please sign in to comment.