From 7d5f585e91e3dbc0e228a1a9b7c4f9f1f196b528 Mon Sep 17 00:00:00 2001 From: Sainnhe Park Date: Sun, 20 Mar 2022 11:30:06 +0800 Subject: [PATCH] Use fastgit mirror --- CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 878b83b..c9364fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 + include ) -