15 lines
440 B
CMake
15 lines
440 B
CMake
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
googletest
|
|
GIT_REPOSITORY https://github.com/google/googletest.git
|
|
GIT_TAG v1.8.x # 1.8.x works with pré C++11 compilers, which allows us to compile tests for toolchains
|
|
GIT_SHALLOW TRUE
|
|
OVERRIDE_FIND_PACKAGE)
|
|
|
|
FetchContent_MakeAvailable(googletest)
|
|
|
|
# Workaround for warning treated as error in gtest
|
|
# https://stackoverflow.com/a/75379860
|
|
target_compile_options(gtest PRIVATE "-w")
|