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