Skip to content

Commit e8a57ca

Browse files
authored
support optional gitee gtest download (#1793)
* support gitee gtest download * put the download address in googletest.cmake.in
1 parent b0c4bbc commit e8a57ca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/cmake/googletest.cmake.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ cmake_minimum_required(VERSION 2.8.2)
22

33
project(googletest-download NONE)
44

5+
if (USE_GITEE_GTEST)
6+
set(GTEST_REPO_ADDRESS "https://gitee.com/mirrors/googletest.git")
7+
else ()
8+
set(GTEST_REPO_ADDRESS "https://github.com/google/googletest.git")
9+
endif()
10+
511
include(ExternalProject)
612
ExternalProject_Add(googletest
7-
GIT_REPOSITORY https://github.com/google/googletest.git
13+
GIT_REPOSITORY ${GTEST_REPO_ADDRESS}
814
GIT_TAG main
915
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
1016
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"

0 commit comments

Comments
 (0)