!33820 [MS][LITE][develop] lite enable gitee mirror

Merge pull request !33820 from sunsuodong/lite_enable_gitee_mirror
This commit is contained in:
i-robot 2022-05-05 01:56:38 +00:00 committed by Gitee
commit 0259df3437
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 3 deletions

View File

@ -56,6 +56,7 @@ option(MSLITE_ENABLE_EXPERIMENTAL_KERNEL "enable experimental kernel" on)
option(MSLITE_ENABLE_GRAPH_KERNEL "enable graph kernel" off)
option(MSLITE_ENABLE_CONVERT_PYTORCH_MODEL "enable to convert pytorch model" off)
option(MSLITE_ENABLE_KERNEL_EXECUTOR "enable kernel executor" off)
option(MSLITE_ENABLE_GITEE_MIRROR "enable download third_party from gitee mirror" off)
#Option that can be configured through manually
option(ENABLE_VERBOSE "" off)
@ -189,6 +190,14 @@ if(DEFINED ENV{MSLITE_ENABLE_CONVERT_PYTORCH_MODEL} AND DEFINED ENV{LIB_TORCH_PA
set(LIB_TORCH_PATH $ENV{LIB_TORCH_PATH})
endif()
if(DEFINED ENV{MSLITE_ENABLE_GITEE_MIRROR})
set(MSLITE_ENABLE_GITEE_MIRROR $ENV{MSLITE_ENABLE_GITEE_MIRROR})
endif()
if(MSLITE_ENABLE_GITEE_MIRROR)
set(ENABLE_GITEE ON)
endif()
if(MACHINE_LINUX_ARM64)
add_compile_definitions(MACHINE_LINUX_ARM64)
add_compile_definitions(LINUX_RUNTIME)

View File

@ -795,9 +795,7 @@ if [[ "${DEBUG_MODE}" == "on" ]]; then
else
CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release "
fi
if [[ "X$ENABLE_GITEE" = "Xon" ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_GITEE=ON"
fi
if [[ "X$ENABLE_FAST_HASH_TABLE" == "Xon" ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_FAST_HASH_TABLE=ON"
else