blob: 7ba18874b9ff80d30eb3233837c8386a98ae2e58 [file] [log] [blame]
Austin Schuhcbc17402019-01-21 21:00:30 -08001licenses(["notice"])
2
3config_setting(
4 name = "windows",
5 values = {
6 "cpu": "x64_windows",
7 },
8 visibility = [":__subpackages__"],
9)
10
11cc_library(
12 name = "benchmark",
13 srcs = glob(
14 [
15 "src/*.cc",
16 "src/*.h",
17 ],
18 exclude = ["src/benchmark_main.cc"],
19 ),
20 hdrs = ["include/benchmark/benchmark.h"],
Austin Schuh033df092019-01-21 19:46:48 -080021 copts = [
22 "-Wno-format-nonliteral",
23 "-Wno-deprecated-declarations",
24 ],
Austin Schuhcbc17402019-01-21 21:00:30 -080025 linkopts = select({
26 ":windows": ["-DEFAULTLIB:shlwapi.lib"],
27 "//conditions:default": ["-pthread"],
28 }),
29 strip_include_prefix = "include",
30 visibility = ["//visibility:public"],
31)
32
33cc_library(
34 name = "benchmark_main",
35 srcs = ["src/benchmark_main.cc"],
36 hdrs = ["include/benchmark/benchmark.h"],
37 strip_include_prefix = "include",
38 visibility = ["//visibility:public"],
39 deps = [":benchmark"],
40)
41
42cc_library(
43 name = "benchmark_internal_headers",
44 hdrs = glob(["src/*.h"]),
45 visibility = ["//test:__pkg__"],
46)