mirror of https://github.com/google/snappy.git
chore(bazel): add MODULE.bazel files for bzlmod
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
52820ea9c6
commit
09d30d36f4
2
.bazelrc
2
.bazelrc
|
@ -1,2 +1,4 @@
|
||||||
# googletest requires C++14 or above
|
# googletest requires C++14 or above
|
||||||
build --cxxopt='-std=c++17'
|
build --cxxopt='-std=c++17'
|
||||||
|
# Enable Bzlmod for every Bazel command
|
||||||
|
common --enable_bzlmod
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
# Build directory.
|
# Build directory.
|
||||||
build/
|
build/
|
||||||
/bazel-*
|
/bazel-*
|
||||||
|
MODULE.bazel.lock
|
||||||
out/
|
out/
|
||||||
|
|
15
BUILD.bazel
15
BUILD.bazel
|
@ -40,7 +40,7 @@ config_setting(
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "config",
|
name = "config",
|
||||||
hdrs = ["config.h"],
|
hdrs = ["config.h"],
|
||||||
defines = ["HAVE_CONFIG_H"]
|
defines = ["HAVE_CONFIG_H"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -70,10 +70,11 @@ cc_library(
|
||||||
"snappy-sinksource.h",
|
"snappy-sinksource.h",
|
||||||
],
|
],
|
||||||
copts = select({
|
copts = select({
|
||||||
":windows": [],
|
":windows": [],
|
||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
"-Wno-sign-compare",
|
"-Wno-sign-compare",
|
||||||
]}),
|
],
|
||||||
|
}),
|
||||||
deps = [
|
deps = [
|
||||||
":config",
|
":config",
|
||||||
":snappy-stubs-internal",
|
":snappy-stubs-internal",
|
||||||
|
@ -114,7 +115,7 @@ cc_test(
|
||||||
deps = [
|
deps = [
|
||||||
":snappy",
|
":snappy",
|
||||||
":snappy-test",
|
":snappy-test",
|
||||||
"//third_party/benchmark:benchmark_main",
|
"@com_google_benchmark//:benchmark_main",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ cc_test(
|
||||||
deps = [
|
deps = [
|
||||||
":snappy",
|
":snappy",
|
||||||
":snappy-test",
|
":snappy-test",
|
||||||
"//third_party/googletest:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
module(
|
||||||
|
name = "snappy",
|
||||||
|
version = "1.2.0",
|
||||||
|
compatibility_level = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
bazel_dep(
|
||||||
|
name = "googletest",
|
||||||
|
version = "1.14.0.bcr.1",
|
||||||
|
dev_dependency = True,
|
||||||
|
repo_name = "com_google_googletest",
|
||||||
|
)
|
||||||
|
bazel_dep(
|
||||||
|
name = "google_benchmark",
|
||||||
|
version = "1.8.3",
|
||||||
|
dev_dependency = True,
|
||||||
|
repo_name = "com_google_benchmark",
|
||||||
|
)
|
||||||
|
|
||||||
|
bazel_dep(
|
||||||
|
name = "platforms",
|
||||||
|
version = "0.0.9",
|
||||||
|
)
|
Loading…
Reference in New Issue