Austin Schuh | cbc1740 | 2019-01-21 21:00:30 -0800 | [diff] [blame] | 1 | licenses(["notice"]) |
| 2 | |
| 3 | config_setting( |
| 4 | name = "windows", |
| 5 | values = { |
| 6 | "cpu": "x64_windows", |
| 7 | }, |
| 8 | visibility = [":__subpackages__"], |
| 9 | ) |
| 10 | |
| 11 | cc_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 Schuh | 033df09 | 2019-01-21 19:46:48 -0800 | [diff] [blame^] | 21 | copts = [ |
| 22 | "-Wno-format-nonliteral", |
| 23 | "-Wno-deprecated-declarations", |
| 24 | ], |
Austin Schuh | cbc1740 | 2019-01-21 21:00:30 -0800 | [diff] [blame] | 25 | linkopts = select({ |
| 26 | ":windows": ["-DEFAULTLIB:shlwapi.lib"], |
| 27 | "//conditions:default": ["-pthread"], |
| 28 | }), |
| 29 | strip_include_prefix = "include", |
| 30 | visibility = ["//visibility:public"], |
| 31 | ) |
| 32 | |
| 33 | cc_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 | |
| 42 | cc_library( |
| 43 | name = "benchmark_internal_headers", |
| 44 | hdrs = glob(["src/*.h"]), |
| 45 | visibility = ["//test:__pkg__"], |
| 46 | ) |