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) set(CMAKE_CXX_STANDARD 11)
include(FetchContent) include(FetchContent)
FetchContent_Declare( fetchcontent_declare(
googletest 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 # For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest) fetchcontent_makeavailable(googletest)
enable_testing() enable_testing()
FILE(GLOB Sources src/*.cpp) file(GLOB Sources src/*.cpp)
FILE(GLOB Tests tests/*.cpp) file(GLOB Tests tests/*.cpp)
add_executable( add_executable(
leetcode leetcode_tests
${Sources} ${Sources}
${Tests} ${Tests}
) )
target_link_libraries( target_link_libraries(
leetcode leetcode_tests
gtest_main gtest_main
) )
include(GoogleTest) include(GoogleTest)
gtest_discover_tests(leetcode) gtest_discover_tests(leetcode_tests)
target_include_directories(leetcode target_include_directories(
leetcode_tests
PRIVATE PRIVATE
include include
) )