1workspace(name = "com_googlesource_code_cctz") 2 3# GoogleTest/GoogleMock framework. Used by most unit-tests. 4http_archive( 5 name = "com_google_googletest", 6 urls = ["https://github.com/google/googletest/archive/master.zip"], 7 strip_prefix = "googletest-master", 8) 9 10# Google Benchmark library. 11new_http_archive( 12 name = "com_google_benchmark", 13 urls = ["https://github.com/google/benchmark/archive/master.zip"], 14 strip_prefix = "benchmark-master", 15 build_file_content = 16""" 17config_setting( 18 name = "windows", 19 values = { 20 "cpu": "x64_windows", 21 }, 22) 23 24cc_library( 25 name = "benchmark", 26 srcs = glob([ 27 "src/*.h", 28 "src/*.cc", 29 ]), 30 hdrs = glob(["include/benchmark/*.h"]), 31 copts = [ 32 "-DHAVE_STD_REGEX", 33 ], 34 includes = [ 35 "include", 36 ], 37 linkopts = select({ 38 ":windows": ["-defaultlib:shlwapi.lib"], 39 "//conditions:default": ["-pthread"], 40 }), 41 visibility = ["//visibility:public"], 42) 43""" 44) 45