aboutsummaryrefslogtreecommitdiff
path: root/BUILD.bazel
diff options
context:
space:
mode:
authorAlex Strelnikov <strel@google.com>2018-05-01 10:24:38 -0400
committerDominic Hamon <dominichamon@users.noreply.github.com>2018-05-01 15:24:38 +0100
commitb678a2026df75bdcaebbda40440b8495babf078e (patch)
tree31c55882896d35fc6dac8c040618fa8ecd6a1bcc /BUILD.bazel
parented1bac8434b3f970a5b7de3fea8f09dc4b1773ee (diff)
downloadgoogle-benchmark-b678a2026df75bdcaebbda40440b8495babf078e.tar.gz
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.
Diffstat (limited to 'BUILD.bazel')
-rw-r--r--BUILD.bazel12
1 files changed, 12 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index 35605cc..7a9bac7 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -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"],
)