1licenses(["notice"]) 2 3config_setting( 4 name = "qnx", 5 constraint_values = ["@platforms//os:qnx"], 6 values = { 7 "cpu": "x64_qnx", 8 }, 9 visibility = [":__subpackages__"], 10) 11 12config_setting( 13 name = "windows", 14 constraint_values = ["@platforms//os:windows"], 15 values = { 16 "cpu": "x64_windows", 17 }, 18 visibility = [":__subpackages__"], 19) 20 21cc_library( 22 name = "benchmark", 23 srcs = glob( 24 [ 25 "src/*.cc", 26 "src/*.h", 27 ], 28 exclude = ["src/benchmark_main.cc"], 29 ), 30 hdrs = ["include/benchmark/benchmark.h"], 31 linkopts = select({ 32 ":windows": ["-DEFAULTLIB:shlwapi.lib"], 33 "//conditions:default": ["-pthread"], 34 }), 35 strip_include_prefix = "include", 36 visibility = ["//visibility:public"], 37) 38 39cc_library( 40 name = "benchmark_main", 41 srcs = ["src/benchmark_main.cc"], 42 hdrs = ["include/benchmark/benchmark.h"], 43 strip_include_prefix = "include", 44 visibility = ["//visibility:public"], 45 deps = [":benchmark"], 46) 47 48cc_library( 49 name = "benchmark_internal_headers", 50 hdrs = glob(["src/*.h"]), 51 visibility = ["//test:__pkg__"], 52) 53