mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 12:30:14 +08:00
141b554e3a
- The export.h is no longer generated, so removed the comment. - Added export.h to benchmark_main
61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
licenses(["notice"])
|
|
|
|
config_setting(
|
|
name = "qnx",
|
|
constraint_values = ["@platforms//os:qnx"],
|
|
values = {
|
|
"cpu": "x64_qnx",
|
|
},
|
|
visibility = [":__subpackages__"],
|
|
)
|
|
|
|
config_setting(
|
|
name = "windows",
|
|
constraint_values = ["@platforms//os:windows"],
|
|
values = {
|
|
"cpu": "x64_windows",
|
|
},
|
|
visibility = [":__subpackages__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "benchmark",
|
|
srcs = glob(
|
|
[
|
|
"src/*.cc",
|
|
"src/*.h",
|
|
],
|
|
exclude = ["src/benchmark_main.cc"],
|
|
),
|
|
hdrs = [
|
|
"include/benchmark/benchmark.h",
|
|
"include/benchmark/export.h",
|
|
],
|
|
linkopts = select({
|
|
":windows": ["-DEFAULTLIB:shlwapi.lib"],
|
|
"//conditions:default": ["-pthread"],
|
|
}),
|
|
strip_include_prefix = "include",
|
|
visibility = ["//visibility:public"],
|
|
# Only static linking is allowed; no .so will be produced.
|
|
# Using `defines` (i.e. not `local_defines`) means that no
|
|
# dependent rules need to bother about defining the macro.
|
|
linkstatic = True,
|
|
defines = ["BENCHMARK_STATIC_DEFINE"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "benchmark_main",
|
|
srcs = ["src/benchmark_main.cc"],
|
|
hdrs = ["include/benchmark/benchmark.h", "include/benchmark/export.h"],
|
|
strip_include_prefix = "include",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":benchmark"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "benchmark_internal_headers",
|
|
hdrs = glob(["src/*.h"]),
|
|
visibility = ["//test:__pkg__"],
|
|
)
|