mirror of
https://github.com/google/benchmark.git
synced 2024-11-28 05:44:40 +00:00
Update bazel WORKSPACE and BUILD files to work better on Windows. (#581)
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.
This commit is contained in:
parent
b678a2026d
commit
62a9d756ea
|
@ -16,7 +16,7 @@ cc_library(
|
|||
]),
|
||||
hdrs = ["include/benchmark/benchmark.h"],
|
||||
linkopts = select({
|
||||
":windows": [],
|
||||
":windows": ["-DEFAULTLIB:shlwapi.lib"],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}),
|
||||
strip_include_prefix = "include",
|
||||
|
|
|
@ -933,7 +933,7 @@ sudo cpupower frequency-set --governor powersave
|
|||
|
||||
# Known Issues
|
||||
|
||||
### Windows
|
||||
### Windows with CMake
|
||||
|
||||
* Users must manually link `shlwapi.lib`. Failure to do so may result
|
||||
in unresolved symbols.
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
workspace(name = "com_github_google_benchmark")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
|
||||
git_repository(
|
||||
http_archive(
|
||||
name = "com_google_googletest",
|
||||
commit = "3f0cf6b62ad1eb50d8736538363d3580dd640c3e", # HEAD
|
||||
remote = "https://github.com/google/googletest",
|
||||
urls = ["https://github.com/google/googletest/archive/3f0cf6b62ad1eb50d8736538363d3580dd640c3e.zip"],
|
||||
strip_prefix = "googletest-3f0cf6b62ad1eb50d8736538363d3580dd640c3e",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue