mirror of
https://gitee.com/openharmony/third_party_benchmark
synced 2024-11-23 15:30:48 +00:00
62a9d756ea
Note, bazel only supports MSVC on Windows, and not MinGW, so linking against shlwapi.lib only needs to follow MSVC conventions. git_repository() did not work in local testing, so is swapped for http_archive(). The latter is also documented as the preferred way to depend on an external library in bazel.
31 lines
633 B
Python
31 lines
633 B
Python
licenses(["notice"])
|
|
|
|
config_setting(
|
|
name = "windows",
|
|
values = {
|
|
"cpu": "x64_windows",
|
|
},
|
|
visibility = [":__subpackages__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "benchmark",
|
|
srcs = glob([
|
|
"src/*.cc",
|
|
"src/*.h",
|
|
]),
|
|
hdrs = ["include/benchmark/benchmark.h"],
|
|
linkopts = select({
|
|
":windows": ["-DEFAULTLIB:shlwapi.lib"],
|
|
"//conditions:default": ["-pthread"],
|
|
}),
|
|
strip_include_prefix = "include",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "benchmark_internal_headers",
|
|
hdrs = glob(["src/*.h"]),
|
|
visibility = ["//test:__pkg__"],
|
|
)
|