-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMODULE.bazel
More file actions
48 lines (41 loc) · 2.32 KB
/
MODULE.bazel
File metadata and controls
48 lines (41 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module(name = "leetcode")
bazel_dep(name = "rules_cc", version = "0.2.17")
# Python rules - needed for hedron_compile_commands
bazel_dep(name = "rules_python", version = "1.7.0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.12",
is_default = True,
)
use_repo(python, "python_3_12")
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
commit = "abb61a688167623088f8768cc9264798df6a9d10",
# Replace the commit hash (above) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main).
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
)
# Load hedron_compile_commands extensions
hedron_compile_commands_ext = use_extension("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_extension")
hedron_compile_commands_ext_t = use_extension("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_extension")
hedron_compile_commands_ext_tt = use_extension("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_extension")
hedron_compile_commands_ext_ttt = use_extension("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_extension")
bazel_dep(name = "googletest", version = "1.17.0")
# 2025.9.19的提交解决了rules_cc的问题, 但1.17.0版本没有; 日后合入主线的话可以更新版本去掉这段
git_override(
module_name = "googletest",
remote = "https://github.com/google/googletest.git",
commit = "85087857ad10bd407cd6ed2f52f7ea9752db621f"
)
bazel_dep(name = "nlohmann_json", version = "3.12.0")
# 找了个最新的可以work的commit(2026.1.2); 日后合入主线的话可以更新版本去掉这段
git_override(
module_name = "nlohmann_json",
remote = "https://github.com/nlohmann/json.git",
commit = "515d994acbac04e0efa41db21e0d16591f6f97c9"
)
daily = use_repo_rule("//:extensions.bzl", "daily")
daily(name = "daily")