Skip to content

Commit

Permalink
Use a more recent commit of googletest that uses OS constraints from
Browse files Browse the repository at this point in the history
@platforms//os:* instead of from @build_tools//platforms:*

See bazelbuild/bazel#8622

Necessary to fix google#4096

Also need the fix for google#4098

PiperOrigin-RevId: 497182073
Change-Id: Ifd568b088d2f779755dd20264edfd5dad12ca9cc
  • Loading branch information
Abseil Team authored and kunitoki committed Nov 4, 2023
1 parent 963ff1b commit bfd4df4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/quickstart-bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ compatible with GoogleTest.
If you don't already have Bazel installed, see the
[Bazel installation guide](https://bazel.build/install).

{: .callout .note}
Note: The terminal commands in this tutorial show a Unix shell prompt, but the
commands work on the Windows command line as well.
{: .callout .note} Note: The terminal commands in this tutorial show a Unix
shell prompt, but the commands work on the Windows command line as well.

## Set up a Bazel workspace

Expand Down Expand Up @@ -51,16 +50,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip"],
strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5",
urls = ["https://github.com/google/googletest/archive/5ab508a01f9eb089207ee87fd547d290da39d015.zip"],
strip_prefix = "googletest-5ab508a01f9eb089207ee87fd547d290da39d015",
)
```

The above configuration declares a dependency on GoogleTest which is downloaded
as a ZIP archive from GitHub. In the above example,
`609281088cfefc76f9d0ce82e1ff6c30cc3591e5` is the Git commit hash of the
`5ab508a01f9eb089207ee87fd547d290da39d015` is the Git commit hash of the
GoogleTest version to use; we recommend updating the hash often to point to the
latest version.
latest version. Use a recent hash on the `main` branch.

Now you're ready to build C++ code that uses GoogleTest.

Expand Down

0 comments on commit bfd4df4

Please sign in to comment.