Skip to content

Commit f45b372

Browse files
committed
Build check natively in bazel
1 parent 7fa1bb8 commit f45b372

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Diff for: WORKSPACE.bazel

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "rules_swiftnav",
7-
strip_prefix = "rules_swiftnav-82e89313fc0c2046a2b19d4a4da5167a88f5da3f",
8-
url = "https://github.com/swift-nav/rules_swiftnav/archive/82e89313fc0c2046a2b19d4a4da5167a88f5da3f.tar.gz",
7+
strip_prefix = "rules_swiftnav-9a47006cf0f0ea3fa65773957e737b5e7812cd8d",
8+
url = "https://github.com/swift-nav/rules_swiftnav/archive/9a47006cf0f0ea3fa65773957e737b5e7812cd8d.tar.gz",
99
)
1010

1111
http_archive(
@@ -41,3 +41,9 @@ new_local_repository(
4141
build_file = "@rules_swiftnav//third_party:check.BUILD",
4242
path = "c/third_party/check",
4343
)
44+
45+
new_local_repository(
46+
name = "check-cmake",
47+
build_file = "@rules_swiftnav//third_party:check-cmake.BUILD",
48+
path = "c/third_party/check",
49+
)

Diff for: c/BUILD.bazel

+8-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ swift_cc_test(
7777
type = UNIT,
7878
deps = [
7979
":sbp",
80-
"@check",
81-
],
80+
] + select({
81+
"@bazel_tools//src/conditions:darwin": ["@check-cmake//:check"],
82+
"//conditions:default": ["@check"],
83+
}),
8284
)
8385

8486
SBP_V4_C_SOURCES = glob(["test/auto*.c"])
@@ -96,8 +98,10 @@ swift_cc_test(
9698
type = UNIT,
9799
deps = [
98100
":sbp",
99-
"@check",
100-
],
101+
] + select({
102+
"@bazel_tools//src/conditions:darwin": ["@check-cmake//:check"],
103+
"//conditions:default": ["@check"],
104+
}),
101105
)
102106

103107
SBP_CPP_V4_C_SOURCES = glob(["test/cpp/auto*.cc"])

0 commit comments

Comments
 (0)