Skip to content

Commit

Permalink
Build check natively in bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
wwieclaw committed Apr 3, 2023
1 parent 7fa1bb8 commit f45b372
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 8 additions & 2 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_swiftnav",
strip_prefix = "rules_swiftnav-82e89313fc0c2046a2b19d4a4da5167a88f5da3f",
url = "https://github.com/swift-nav/rules_swiftnav/archive/82e89313fc0c2046a2b19d4a4da5167a88f5da3f.tar.gz",
strip_prefix = "rules_swiftnav-9a47006cf0f0ea3fa65773957e737b5e7812cd8d",
url = "https://github.com/swift-nav/rules_swiftnav/archive/9a47006cf0f0ea3fa65773957e737b5e7812cd8d.tar.gz",
)

http_archive(
Expand Down Expand Up @@ -41,3 +41,9 @@ new_local_repository(
build_file = "@rules_swiftnav//third_party:check.BUILD",
path = "c/third_party/check",
)

new_local_repository(
name = "check-cmake",
build_file = "@rules_swiftnav//third_party:check-cmake.BUILD",
path = "c/third_party/check",
)
12 changes: 8 additions & 4 deletions c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ swift_cc_test(
type = UNIT,
deps = [
":sbp",
"@check",
],
] + select({
"@bazel_tools//src/conditions:darwin": ["@check-cmake//:check"],
"//conditions:default": ["@check"],
}),
)

SBP_V4_C_SOURCES = glob(["test/auto*.c"])
Expand All @@ -96,8 +98,10 @@ swift_cc_test(
type = UNIT,
deps = [
":sbp",
"@check",
],
] + select({
"@bazel_tools//src/conditions:darwin": ["@check-cmake//:check"],
"//conditions:default": ["@check"],
}),
)

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

0 comments on commit f45b372

Please sign in to comment.