!7387 add gitee download

Merge pull request !7387 from hexia/master
This commit is contained in:
mindspore-ci-bot 2020-10-19 09:21:14 +08:00 committed by Gitee
commit 143484394f
2 changed files with 21 additions and 4 deletions

View File

@ -29,12 +29,20 @@ if (OPENSSL_ROOT_DIR)
set(_CMAKE_ARGS_OPENSSL_ROOT_DIR "-DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT_DIR}")
endif()
if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/grpc/repository/archive/v1.27.3.tar.gz")
set(MD5 "b8b6d8defeda0355105e3b64b4201786")
else()
set(REQ_URL "https://github.com/grpc/grpc/archive/v1.27.3.tar.gz")
set(MD5 "0c6c3fc8682d4262dd0e5e6fabe1a7e2")
endif ()
mindspore_add_pkg(grpc
VER 1.27.3
LIBS grpc++ grpc gpr upb address_sorting
EXE grpc_cpp_plugin
URL https://github.com/grpc/grpc/archive/v1.27.3.tar.gz
MD5 0c6c3fc8682d4262dd0e5e6fabe1a7e2
URL ${REQ_URL}
MD5 ${MD5}
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release
-DgRPC_INSTALL:BOOL=ON
-DgRPC_BUILD_TESTS:BOOL=OFF

View File

@ -1,10 +1,19 @@
set(libevent_CFLAGS "-fstack-protector-all -D_FORTIFY_SOURCE=2 -O2")
set(libevent_LDFLAGS "-Wl,-z,now")
if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/libevent/repository/archive/release-2.1.12-stable.tar.gz")
set(MD5 "c9036513dd9e5b4fa1c81ade23b7ead2")
else()
set(REQ_URL "https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz")
set(MD5 "b5333f021f880fe76490d8a799cd79f4")
endif ()
mindspore_add_pkg(libevent
VER 2.1.12
LIBS event event_pthreads
URL https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
MD5 b5333f021f880fe76490d8a799cd79f4
URL ${REQ_URL}
MD5 ${MD5}
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING=OFF)
include_directories(${libevent_INC})