diff --git a/cmake/external/cryptopp.cmake b/cmake/external/cryptopp.cmake index aedd40aec68481e1a92924bcd484384ecdd87d88..4c3bca56f33730f3a2a63ad92b63124edafa39e7 100644 --- a/cmake/external/cryptopp.cmake +++ b/cmake/external/cryptopp.cmake @@ -52,16 +52,12 @@ set(CRYPTOPP_CMAKE_ARGS ${COMMON_CMAKE_ARGS} INCLUDE_DIRECTORIES(${CRYPTOPP_INCLUDE_DIR}) -cache_third_party(extern_cryptopp - REPOSITORY ${CRYPTOPP_REPOSITORY} - TAG ${CRYPTOPP_TAG} - DIR CRYPTOPP_SOURCE_DIR) - ExternalProject_Add( extern_cryptopp ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${CRYPTOPP_DOWNLOAD_CMD}" + GIT_REPOSITORY ${CRYPTOPP_REPOSITORY} + GIT_TAG ${CRYPTOPP_TAG} PREFIX ${CRYPTOPP_PREFIX_DIR} SOURCE_DIR ${CRYPTOPP_SOURCE_DIR} UPDATE_COMMAND "" diff --git a/cmake/external/dgc.cmake b/cmake/external/dgc.cmake index 3c64e1ea11ecd65ab15e80147cd62b1cde371722..655611e06e26f6e787f4329a824645be106512b7 100644 --- a/cmake/external/dgc.cmake +++ b/cmake/external/dgc.cmake @@ -22,14 +22,10 @@ SET(DGC_LIBRARIES "${DGC_INSTALL_DIR}/lib/libdgc.a" CACHE FILEPATH "dgc librar SET(DGC_URL "https://fleet.bj.bcebos.com/dgc/collective_f66ef73.tgz") INCLUDE_DIRECTORIES(${DGC_INCLUDE_DIR}) -cache_third_party(extern_dgc - URL ${DGC_URL} - DIR DGC_SOURCES_DIR) - ExternalProject_Add( extern_dgc ${EXTERNAL_PROJECT_LOG_ARGS} - "${DGC_DOWNLOAD_CMD}" + URL ${DGC_URL} URL_MD5 "94e6fa1bc97169d0e1aad44570fe3251" PREFIX "${DGC_PREFIX_DIR}" SOURCE_DIR "${DGC_SOURCES_DIR}" diff --git a/cmake/external/dlpack.cmake b/cmake/external/dlpack.cmake index 43ffde75992266c432f602e54bad8cbc70c17f86..be97a026e23e35d626dbfc982783bffc170f86b7 100644 --- a/cmake/external/dlpack.cmake +++ b/cmake/external/dlpack.cmake @@ -20,11 +20,6 @@ set(DLPACK_SOURCE_DIR ${THIRD_PARTY_PATH}/dlpack/src/extern_dlpack) set(DLPACK_REPOSITORY ${GIT_URL}/dmlc/dlpack.git) set(DLPACK_TAG v0.4) -cache_third_party(extern_dlpack - REPOSITORY ${DLPACK_REPOSITORY} - TAG ${DLPACK_TAG} - DIR DLPACK_SOURCE_DIR) - set(DLPACK_INCLUDE_DIR ${DLPACK_SOURCE_DIR}/include) include_directories(${DLPACK_INCLUDE_DIR}) @@ -32,7 +27,8 @@ ExternalProject_Add( extern_dlpack ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${DLPACK_DOWNLOAD_CMD}" + GIT_REPOSITORY ${DLPACK_REPOSITORY} + GIT_TAG ${DLPACK_TAG} PREFIX ${DLPACK_PREFIX_DIR} SOURCE_DIR ${DLPACK_SOURCE_DIR} UPDATE_COMMAND "" diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake index aa471002eacb6a61a9cf835f293a86a75d87db8f..9293b3ebcedf352ef98947edacdec4c99f1db49a 100644 --- a/cmake/external/eigen.cmake +++ b/cmake/external/eigen.cmake @@ -20,11 +20,6 @@ set(EIGEN_SOURCE_DIR ${THIRD_PARTY_PATH}/eigen3/src/extern_eigen3) set(EIGEN_REPOSITORY https://gitlab.com/libeigen/eigen.git) set(EIGEN_TAG f612df273689a19d25b45ca4f8269463207c4fee) -cache_third_party(extern_eigen3 - REPOSITORY ${EIGEN_REPOSITORY} - TAG ${EIGEN_TAG} - DIR EIGEN_SOURCE_DIR) - if(WIN32) add_definitions(-DEIGEN_STRONG_INLINE=inline) elseif(LINUX) @@ -46,9 +41,10 @@ ExternalProject_Add( extern_eigen3 ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${EIGEN_DOWNLOAD_CMD}" - PREFIX ${EIGEN_PREFIX_DIR} - SOURCE_DIR ${EIGEN_SOURCE_DIR} + GIT_REPOSITORY ${EIGEN_REPOSITORY} + GIT_TAG ${EIGEN_TAG} + PREFIX ${EIGEN_PREFIX_DIR} + SOURCE_DIR ${EIGEN_SOURCE_DIR} UPDATE_COMMAND "" PATCH_COMMAND ${EIGEN_PATCH_COMMAND} CONFIGURE_COMMAND "" diff --git a/cmake/external/gflags.cmake b/cmake/external/gflags.cmake index 0f9739014d52bf1692d31a6c0410da763d850e73..e4e475720604f9a67f0974da87d772db678a60d6 100644 --- a/cmake/external/gflags.cmake +++ b/cmake/external/gflags.cmake @@ -30,16 +30,12 @@ ENDIF(WIN32) INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIR}) -cache_third_party(extern_gflags - REPOSITORY ${GFLAGS_REPOSITORY} - TAG ${GFLAGS_TAG} - DIR GFLAGS_SOURCE_DIR) - ExternalProject_Add( extern_gflags ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${GFLAGS_DOWNLOAD_CMD}" + GIT_REPOSITORY ${GFLAGS_REPOSITORY} + GIT_TAG ${GFLAGS_TAG} PREFIX ${GFLAGS_PREFIX_DIR} UPDATE_COMMAND "" SOURCE_DIR ${GFLAGS_SOURCE_DIR} diff --git a/cmake/external/glog.cmake b/cmake/external/glog.cmake index b9dbe90a92e6f42174fa328530d760ce267cf7d8..2897b54bd62993840d37361576632b18d9264aa2 100644 --- a/cmake/external/glog.cmake +++ b/cmake/external/glog.cmake @@ -32,16 +32,12 @@ ENDIF(WIN32) INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIR}) -cache_third_party(extern_glog - REPOSITORY ${GLOG_REPOSITORY} - TAG ${GLOG_TAG} - DIR GLOG_SOURCE_DIR) - ExternalProject_Add( extern_glog ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${GLOG_DOWNLOAD_CMD}" + GIT_REPOSITORY ${GLOG_REPOSITORY} + GIT_TAG ${GLOG_TAG} DEPENDS gflags PREFIX ${GLOG_PREFIX_DIR} SOURCE_DIR ${GLOG_SOURCE_DIR} diff --git a/cmake/external/gloo.cmake b/cmake/external/gloo.cmake index 03e45e3e5c67b0118727a616f8cd0c013c621fe6..8d4b0c4ebf0e719c5c37749bae93838875a3b892 100644 --- a/cmake/external/gloo.cmake +++ b/cmake/external/gloo.cmake @@ -27,17 +27,13 @@ SET(GLOO_LIBRARIES "${GLOO_INSTALL_DIR}/lib/libgloo.a" CACHE FILEPATH "gloo INCLUDE_DIRECTORIES(${GLOO_INCLUDE_DIR}) -cache_third_party(extern_gloo - REPOSITORY ${GLOO_REPOSITORY} - TAG ${GLOO_TAG} - DIR GLOO_SOURCE_DIR) - if(WITH_ASCEND OR WITH_ASCEND_CL) ExternalProject_Add( extern_gloo ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${GLOO_DOWNLOAD_CMD}" + GIT_REPOSITORY ${GLOO_REPOSITORY} + GIT_TAG ${GLOO_TAG} PREFIX "${GLOO_PREFIX_DIR}" SOURCE_DIR "${GLOO_SOURCE_DIR}" UPDATE_COMMAND "" @@ -54,7 +50,8 @@ else() extern_gloo ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${GLOO_DOWNLOAD_CMD}" + GIT_REPOSITORY ${GLOO_REPOSITORY} + GIT_TAG ${GLOO_TAG} PREFIX "${GLOO_PREFIX_DIR}" SOURCE_DIR "${GLOO_SOURCE_DIR}" UPDATE_COMMAND "" diff --git a/cmake/external/gtest.cmake b/cmake/external/gtest.cmake index e7d4783a9593a7bac474adc089eaca543db7a600..9758d8a7e4cafda8ae8de7d419cef203afe0a511 100644 --- a/cmake/external/gtest.cmake +++ b/cmake/external/gtest.cmake @@ -47,16 +47,12 @@ IF(WITH_MKLML) SET(GTEST_DEPENDS ${MKLML_PROJECT}) ENDIF() -cache_third_party(extern_gtest - REPOSITORY ${GTEST_REPOSITORY} - TAG ${GTEST_TAG} - DIR GTEST_SOURCE_DIR) - ExternalProject_Add( extern_gtest ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${GTEST_DOWNLOAD_CMD}" + GIT_REPOSITORY ${GTEST_REPOSITORY} + GIT_TAG ${GTEST_TAG} DEPENDS ${GTEST_DEPENDS} PREFIX ${GTEST_PREFIX_DIR} SOURCE_DIR ${GTEST_SOURCE_DIR} diff --git a/cmake/external/mkldnn.cmake b/cmake/external/mkldnn.cmake index 3d041b109427d95c99321586dfcca49ff2f99c06..d004354338ffa1c7fe925171273a241abc462b59 100644 --- a/cmake/external/mkldnn.cmake +++ b/cmake/external/mkldnn.cmake @@ -49,16 +49,12 @@ ELSE() SET(MKLDNN_LIB "${MKLDNN_INSTALL_DIR}/bin/mkldnn.lib" CACHE FILEPATH "mkldnn library." FORCE) ENDIF(NOT WIN32) -cache_third_party(${MKLDNN_PROJECT} - REPOSITORY ${MKLDNN_REPOSITORY} - TAG ${MKLDNN_TAG} - DIR MKLDNN_SOURCE_DIR) - ExternalProject_Add( ${MKLDNN_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${MKLDNN_DOWNLOAD_CMD}" + GIT_REPOSITORY ${MKLDNN_REPOSITORY} + GIT_TAG ${MKLDNN_TAG} DEPENDS ${MKLDNN_DEPENDS} PREFIX ${MKLDNN_PREFIX_DIR} SOURCE_DIR ${MKLDNN_SOURCE_DIR}