2018-03-08 20:48:46 +08:00
|
|
|
licenses(["notice"])
|
|
|
|
|
2018-05-01 22:24:38 +08:00
|
|
|
config_setting(
|
|
|
|
name = "windows",
|
|
|
|
values = {
|
|
|
|
"cpu": "x64_windows",
|
|
|
|
},
|
|
|
|
visibility = [":__subpackages__"],
|
|
|
|
)
|
|
|
|
|
2018-03-08 20:48:46 +08:00
|
|
|
cc_library(
|
|
|
|
name = "benchmark",
|
2018-05-25 18:18:58 +08:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/*.cc",
|
|
|
|
"src/*.h",
|
|
|
|
],
|
|
|
|
exclude = ["src/benchmark_main.cc"],
|
|
|
|
),
|
2018-03-08 20:48:46 +08:00
|
|
|
hdrs = ["include/benchmark/benchmark.h"],
|
2018-05-01 22:24:38 +08:00
|
|
|
linkopts = select({
|
2018-05-02 18:23:18 +08:00
|
|
|
":windows": ["-DEFAULTLIB:shlwapi.lib"],
|
2018-05-01 22:24:38 +08:00
|
|
|
"//conditions:default": ["-pthread"],
|
|
|
|
}),
|
2018-03-08 20:48:46 +08:00
|
|
|
strip_include_prefix = "include",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2018-05-25 18:18:58 +08:00
|
|
|
cc_library(
|
|
|
|
name = "benchmark_main",
|
|
|
|
srcs = ["src/benchmark_main.cc"],
|
|
|
|
hdrs = ["include/benchmark/benchmark.h"],
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [":benchmark"],
|
|
|
|
)
|
|
|
|
|
2018-03-08 20:48:46 +08:00
|
|
|
cc_library(
|
|
|
|
name = "benchmark_internal_headers",
|
|
|
|
hdrs = glob(["src/*.h"]),
|
|
|
|
visibility = ["//test:__pkg__"],
|
|
|
|
)
|