Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to bzlmod #1097

Merged
merged 2 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "gflags", version = "2.2.2", repo_name = "com_github_gflags_gflags")
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
Loading