From ac11c32f4d411b4bcb02358de77d6f96a875d8cf Mon Sep 17 00:00:00 2001 From: lilei Date: Wed, 21 Oct 2020 09:47:33 +0800 Subject: [PATCH] modify_cmake --- cmake/external_libs/pybind11.cmake | 11 +++++++++-- cmake/external_libs/tvm_predict.cmake | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/cmake/external_libs/pybind11.cmake b/cmake/external_libs/pybind11.cmake index e818c192e6e..94669eeefc5 100644 --- a/cmake/external_libs/pybind11.cmake +++ b/cmake/external_libs/pybind11.cmake @@ -1,9 +1,16 @@ +if (ENABLE_GITEE) + set(REQ_URL "https://gitee.com/mirrors/pybind11/repository/archive/v2.4.3.tar.gz") + set(MD5 "b473a37987ce456ea8cc7aab3f9486f9") +else() + set(REQ_URL "https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz") + set(MD5 "62254c40f89925bb894be421fe4cdef2") +endif () set(pybind11_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2") set(pybind11_CFLAGS "-D_FORTIFY_SOURCE=2 -O2") mindspore_add_pkg(pybind11 VER 2.4.3 - URL https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz - MD5 62254c40f89925bb894be421fe4cdef2 + URL ${REQ_URL} + MD5 ${MD5} CMAKE_OPTION -DPYBIND11_TEST=OFF -DPYBIND11_LTO_CXX_FLAGS=FALSE ) include_directories(${pybind11_INC}) diff --git a/cmake/external_libs/tvm_predict.cmake b/cmake/external_libs/tvm_predict.cmake index 9f07b09e2b4..e8c9331912b 100644 --- a/cmake/external_libs/tvm_predict.cmake +++ b/cmake/external_libs/tvm_predict.cmake @@ -1,10 +1,17 @@ +if (ENABLE_GITEE) + set(REQ_URL "https://gitee.com/mirrors/incubator-tvm/repository/archive/v0.6.0.tar.gz") + set(MD5 "7b22965745cf1c6208a4e367fb86a585") +else() + set(REQ_URL "https://github.com/apache/incubator-tvm/release/download/v0.6.0/apache-tvm-src-v0.6.0-incubating.tar.gz") + set(MD5 "2d77a005f0046d937b99c67de82f6438") +endif () set(incubator_tvm_predict_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2") set(incubator_tvm_predict_CFLAGS "-D_FORTIFY_SOURCE=2 -O2") mindspore_add_pkg(incubator_tvm_predict VER 0.6.0 HEAD_ONLY ./ - URL https://github.com/apache/incubator-tvm/release/download/v0.6.0/apache-tvm-src-v0.6.0-incubating.tar.gz - MD5 2d77a005f0046d937b99c67de82f6438 + URL ${REQ_URL} + MD5 ${MD5} PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/predict/0001-RetBugFix-CustomRuntime_v06.patch) include_directories(${incubator_tvm_predict_INC}) add_library(mindspore::incubator_tvm_predict ALIAS incubator_tvm_predict)