mirror of
https://gitee.com/openharmony/third_party_benchmark
synced 2024-11-23 15:30:48 +00:00
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:
parent
ed1bac8434
commit
b678a2026d
12
BUILD.bazel
12
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"],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user