Use fastgit mirror

This commit is contained in:
Sainnhe Park 2022-03-20 11:30:06 +08:00
parent e956e22e72
commit 7d5f585e91

View File

@ -5,34 +5,34 @@ project(leetcode)
set(CMAKE_CXX_STANDARD 11)
include(FetchContent)
FetchContent_Declare(
fetchcontent_declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip
URL https://archive.fastgit.org/google/googletest/archive/refs/tags/release-1.11.0.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
fetchcontent_makeavailable(googletest)
enable_testing()
FILE(GLOB Sources src/*.cpp)
FILE(GLOB Tests tests/*.cpp)
file(GLOB Sources src/*.cpp)
file(GLOB Tests tests/*.cpp)
add_executable(
leetcode
leetcode_tests
${Sources}
${Tests}
)
target_link_libraries(
leetcode
leetcode_tests
gtest_main
)
include(GoogleTest)
gtest_discover_tests(leetcode)
gtest_discover_tests(leetcode_tests)
target_include_directories(leetcode
target_include_directories(
leetcode_tests
PRIVATE
include
)