Skip to content

Commit

Permalink
Add support for Bzlmod
Browse files Browse the repository at this point in the history
  • Loading branch information
derekmauro committed Jul 9, 2024
1 parent 88b3097 commit fc5890c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ignore all files in the bazel directories
/bazel-*
MODULE.bazel.lock
# ignore non-bazel build products
/build
37 changes: 37 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2024 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# https://bazel.build/external/overview#bzlmod

module(
name = "cctz",
version = "head",
compatibility_level = 1,
)

# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.

bazel_dep(name = "google_benchmark",
version = "1.8.4",
repo_name = "com_github_google_benchmark",
dev_dependency = True)

bazel_dep(name = "googletest",
version = "1.14.0.bcr.1",
repo_name = "com_google_googletest",
dev_dependency = True)

bazel_dep(name = "platforms",
version = "0.0.8")
17 changes: 8 additions & 9 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# GoogleTest/GoogleMock framework. Used by most unit-tests.
http_archive(
name = "com_google_googletest",
sha256 = "353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a",
strip_prefix = "googletest-release-1.11.0",
urls = ["https://github.com/google/googletest/archive/release-1.11.0.zip"],
sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7",
strip_prefix = "googletest-1.14.0",
urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"],
)

# Google Benchmark library.
http_archive(
name = "com_github_google_benchmark",
sha256 = "30f2e5156de241789d772dd8b130c1cb5d33473cc2f29e4008eab680df7bd1f0",
strip_prefix = "benchmark-1.5.5",
urls = ["https://github.com/google/benchmark/archive/v1.5.5.zip"],
sha256 = "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45",
strip_prefix = "benchmark-1.8.4",
urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz"],
)

# Bazel platform rules.
http_archive(
name = "platforms",
sha256 = "b601beaf841244de5c5a50d2b2eddd34839788000fa1be4260ce6603ca0d8eb7",
strip_prefix = "platforms-98939346da932eef0b54cf808622f5bb0928f00b",
urls = ["https://github.com/bazelbuild/platforms/archive/98939346da932eef0b54cf808622f5bb0928f00b.zip"],
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
urls = ["https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz"],
)

0 comments on commit fc5890c

Please sign in to comment.