[gtest] Use googletest as a submodule (#1373)
Some Linux distributions use a hermetic build environment to build. This resulted in issues with `FetchContent` attempting to download googletest at configure time. This fixes the issue by integrating googletest as a git submodule instead of downloading it at configure time.
This commit is contained in:
parent
a8ec85d536
commit
dcb9ccca90
|
@ -2,3 +2,6 @@
|
||||||
path = win32-deps
|
path = win32-deps
|
||||||
url = https://github.com/visualboyadvance-m/win32-deps.git
|
url = https://github.com/visualboyadvance-m/win32-deps.git
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "third_party/googletest"]
|
||||||
|
path = third_party/googletest
|
||||||
|
url = https://github.com/google/googletest.git
|
||||||
|
|
|
@ -90,14 +90,9 @@ endif()
|
||||||
|
|
||||||
# Configure gtest
|
# Configure gtest
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
FetchContent_Declare(googletest
|
|
||||||
URL https://github.com/google/googletest/archive/2d16ed055d09c3689d44b272adc097393de948a0.zip
|
|
||||||
EXCLUDE_FROM_ALL
|
|
||||||
)
|
|
||||||
|
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
FetchContent_MakeAvailable(googletest)
|
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||||
|
add_subdirectory(./third_party/googletest)
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b514bdc898e2951020cbdca1304b75f5950d1f59
|
Loading…
Reference in New Issue