Update googletest.cmake

Use CPM and update to version 13
This commit is contained in:
McMassiveNZ
2023-05-31 21:07:21 +02:00
parent b170b98b4d
commit affbd9171d

View File

@@ -1,14 +1,14 @@
include_guard() include_guard()
include(FetchContent) CPMAddPackage(
FetchContent_Declare( NAME googletest
googletest GITHUB_REPOSITORY google/googletest
GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.13.0
GIT_TAG 58d77fa8070e8cec2dc1ed015d66b454c8d78850 # release-1.12.1 VERSION 1.13.0
OPTIONS
"INSTALL_GTEST OFF"
"gtest_force_shared_crt ON"
) )
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
set_property(TARGET set_property(TARGET
gtest gtest
gtest_main gtest_main