Skip to content

Commit

Permalink
support optional gitee gtest download (#1793)
Browse files Browse the repository at this point in the history
* support gitee gtest download

* put the download address in googletest.cmake.in
  • Loading branch information
denghuilu authored Jun 29, 2022
1 parent b0c4bbc commit e8a57ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/cmake/googletest.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ cmake_minimum_required(VERSION 2.8.2)

project(googletest-download NONE)

if (USE_GITEE_GTEST)
set(GTEST_REPO_ADDRESS "https://gitee.com/mirrors/googletest.git")
else ()
set(GTEST_REPO_ADDRESS "https://github.com/google/googletest.git")
endif()

include(ExternalProject)
ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_REPOSITORY ${GTEST_REPO_ADDRESS}
GIT_TAG main
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
Expand Down

0 comments on commit e8a57ca

Please sign in to comment.