Skip to content

Commit

Permalink
Add check-cmake.BUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
wwieclaw committed Apr 3, 2023
1 parent 53cc8fd commit 226af51
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions third_party/check-cmake.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

cmake(
name = "check",
cache_entries = {
"CMAKE_C_FLAGS": "-fPIC",
"CMAKE_INSTALL_LIBDIR": "lib",
"HAVE_SUBUNIT": "0",
},
lib_source = ":srcs",
linkopts = select({
"@bazel_tools//src/conditions:darwin": ["-lpthread"],
"//conditions:default": [
"-lpthread",
"-lrt",
],
}),
out_static_libs = select({
"@bazel_tools//src/conditions:windows": ["check.lib"],
"//conditions:default": ["libcheck.a"],
}),
visibility = ["//visibility:public"],
)

0 comments on commit 226af51

Please sign in to comment.