Skip to content

Commit

Permalink
Use git commit hash in CMake quickstart
Browse files Browse the repository at this point in the history
Commit hashes reflect GoogleTest's live-at-head stance.
Credits to @shinfd.
Fixes google#4000

PiperOrigin-RevId: 483655943
Change-Id: Ieeb162859348dbe3657e18f283bac81412f2585d
  • Loading branch information
dinord authored and copybara-github committed Oct 25, 2022
1 parent 03597a0 commit 90171d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/quickstart-cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ set(CMAKE_CXX_STANDARD 14)
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.12.1
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
```

The above configuration declares a dependency on GoogleTest which is downloaded
from GitHub. In the above example, `609281088cfefc76f9d0ce82e1ff6c30cc3591e5` is
from GitHub. In the above example, `03597a01ee50ed33e9dfd640b249b4be3799d395` is
the Git commit hash of the GoogleTest version to use; we recommend updating the
hash often to point to the latest version.

Expand Down

0 comments on commit 90171d1

Please sign in to comment.