blob: 5069c0b596f5189938324212426826afe6a74818 [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",
Brian Silverman4c7235a2021-11-17 19:04:37 -080024 "-Wno-unused-but-set-variable",
Austin Schuh033df092019-01-21 19:46:48 -080025 ],
Austin Schuhcbc17402019-01-21 21:00:30 -080026 linkopts = select({
27 ":windows": ["-DEFAULTLIB:shlwapi.lib"],
James Kuszmaul872efd22019-12-03 20:59:09 -080028 "//conditions:default": [],
Austin Schuhcbc17402019-01-21 21:00:30 -080029 }),
30 strip_include_prefix = "include",
31 visibility = ["//visibility:public"],
32)
33
34cc_library(
35 name = "benchmark_main",
36 srcs = ["src/benchmark_main.cc"],
37 hdrs = ["include/benchmark/benchmark.h"],
38 strip_include_prefix = "include",
39 visibility = ["//visibility:public"],
40 deps = [":benchmark"],
41)
42
43cc_library(
44 name = "benchmark_internal_headers",
45 hdrs = glob(["src/*.h"]),
46 visibility = ["//test:__pkg__"],
47)