2022-11-26 23:05:41 -08:00
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
|
googletest
|
|
|
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
|
|
|
GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # 1.11.0
|
|
|
|
|
)
|
2019-06-23 12:44:28 -07:00
|
|
|
|
2022-11-26 23:05:41 -08:00
|
|
|
FetchContent_GetProperties(googletest)
|
|
|
|
|
if(NOT googletest_POPULATED)
|
|
|
|
|
FetchContent_Populate(googletest)
|
2019-06-23 12:44:28 -07:00
|
|
|
|
2022-11-26 23:05:41 -08:00
|
|
|
# Prevent overriding the parent project's compiler/linker
|
|
|
|
|
# settings on Windows
|
|
|
|
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
|
|
|
|
|
|
|
|
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
|
|
|
|
|
endif()
|
2021-09-07 13:29:31 -07:00
|
|
|
|
2022-10-15 16:33:14 -07:00
|
|
|
target_compile_features(gtest PUBLIC cxx_std_20)
|
|
|
|
|
target_compile_features(gtest_main PUBLIC cxx_std_20)
|