未验证 提交 da5fb1d4 编写于 作者: S Sing_chan 提交者: GitHub

make third_party's cmake get source code directly (#37332)

上级 3cd3bf29
......@@ -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 ""
......
......@@ -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}"
......
......@@ -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 ""
......
......@@ -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 ""
......
......@@ -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}
......
......@@ -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}
......
......@@ -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 ""
......
......@@ -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}
......
......@@ -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}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册