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.
This commit is contained in:
Alex Strelnikov 2018-05-01 10:24:38 -04:00 committed by Dominic Hamon
parent ed1bac8434
commit b678a2026d
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,13 @@
licenses(["notice"])
config_setting(
name = "windows",
values = {
"cpu": "x64_windows",
},
visibility = [":__subpackages__"],
)
cc_library(
name = "benchmark",
srcs = glob([
@ -7,6 +15,10 @@ cc_library(
"src/*.h",
]),
hdrs = ["include/benchmark/benchmark.h"],
linkopts = select({
":windows": [],
"//conditions:default": ["-pthread"],
}),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
)