Skip to content

Commit 23eb83c

Browse files
committed
Fetch GoogleTest from Git repository instead of zip file
1 parent 958ce53 commit 23eb83c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
# GoogleTest requires at least C++17
2+
set(CMAKE_CXX_STANDARD 17)
3+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4+
15
include(FetchContent)
26
FetchContent_Declare(
37
googletest
4-
DOWNLOAD_EXTRACT_TIMESTAMP
5-
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
8+
GIT_REPOSITORY https://github.com/google/googletest.git
9+
# https://github.com/google/googletest/releases
10+
GIT_TAG 52eb8108c5bdec04579160ae17225d66034bd723 # v1.17.0
611
)
12+
713
# For Windows: Prevent overriding the parent project's compiler/linker settings
814
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
915
FetchContent_MakeAvailable(googletest)

0 commit comments

Comments
 (0)