blob: 6ee69f29072e8d237bb4dff5c473165aca4838a1 [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"],
21 linkopts = select({
22 ":windows": ["-DEFAULTLIB:shlwapi.lib"],
23 "//conditions:default": ["-pthread"],
24 }),
25 strip_include_prefix = "include",
26 visibility = ["//visibility:public"],
27)
28
29cc_library(
30 name = "benchmark_main",
31 srcs = ["src/benchmark_main.cc"],
32 hdrs = ["include/benchmark/benchmark.h"],
33 strip_include_prefix = "include",
34 visibility = ["//visibility:public"],
35 deps = [":benchmark"],
36)
37
38cc_library(
39 name = "benchmark_internal_headers",
40 hdrs = glob(["src/*.h"]),
41 visibility = ["//test:__pkg__"],
42)