Commit b678a202 by Alex Strelnikov Committed by Dominic Hamon

Fix bazel config to link against pthread. (#579)

The benchmarks in the test/ currently build because they all include a dep on gtest, which brings in pthread when needed.
parent ed1bac84
licenses(["notice"]) licenses(["notice"])
config_setting(
name = "windows",
values = {
"cpu": "x64_windows",
},
visibility = [":__subpackages__"],
)
cc_library( cc_library(
name = "benchmark", name = "benchmark",
srcs = glob([ srcs = glob([
...@@ -7,6 +15,10 @@ cc_library( ...@@ -7,6 +15,10 @@ cc_library(
"src/*.h", "src/*.h",
]), ]),
hdrs = ["include/benchmark/benchmark.h"], hdrs = ["include/benchmark/benchmark.h"],
linkopts = select({
":windows": [],
"//conditions:default": ["-pthread"],
}),
strip_include_prefix = "include", strip_include_prefix = "include",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment