提交 6cc544aa 编写于 作者: M Michał Gallus 提交者: Tao Luo

Add Shallow clone to ExternalProjects (#21060)

test=develop
上级 9091f8cd
...@@ -39,6 +39,7 @@ set(prefix_path "${THIRD_PARTY_PATH}/install/gflags|${THIRD_PARTY_PATH}/install/ ...@@ -39,6 +39,7 @@ set(prefix_path "${THIRD_PARTY_PATH}/install/gflags|${THIRD_PARTY_PATH}/install/
ExternalProject_Add( ExternalProject_Add(
extern_brpc extern_brpc
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/apache/incubator-brpc" GIT_REPOSITORY "https://github.com/apache/incubator-brpc"
GIT_TAG "ad00fe940b4f05225b214131959293bbed8744a0" #rdma branch's head now. GIT_TAG "ad00fe940b4f05225b214131959293bbed8744a0" #rdma branch's head now.
PREFIX ${BRPC_SOURCES_DIR} PREFIX ${BRPC_SOURCES_DIR}
......
...@@ -28,6 +28,7 @@ endif() ...@@ -28,6 +28,7 @@ endif()
ExternalProject_Add( ExternalProject_Add(
extern_cares extern_cares
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/c-ares/c-ares.git" GIT_REPOSITORY "https://github.com/c-ares/c-ares.git"
GIT_TAG "cares-1_13_0" GIT_TAG "cares-1_13_0"
PREFIX ${CARES_SOURCES_DIR} PREFIX ${CARES_SOURCES_DIR}
......
...@@ -22,6 +22,7 @@ include_directories(${CUB_INCLUDE_DIR}) ...@@ -22,6 +22,7 @@ include_directories(${CUB_INCLUDE_DIR})
ExternalProject_Add( ExternalProject_Add(
extern_cub extern_cub
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/NVlabs/cub.git" GIT_REPOSITORY "https://github.com/NVlabs/cub.git"
GIT_TAG "v1.8.0" GIT_TAG "v1.8.0"
PREFIX ${CUB_SOURCE_DIR} PREFIX ${CUB_SOURCE_DIR}
......
...@@ -22,6 +22,7 @@ include_directories(${DLPACK_INCLUDE_DIR}) ...@@ -22,6 +22,7 @@ include_directories(${DLPACK_INCLUDE_DIR})
ExternalProject_Add( ExternalProject_Add(
extern_dlpack extern_dlpack
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/dmlc/dlpack.git" GIT_REPOSITORY "https://github.com/dmlc/dlpack.git"
GIT_TAG "v0.2" GIT_TAG "v0.2"
PREFIX ${DLPACK_SOURCE_DIR} PREFIX ${DLPACK_SOURCE_DIR}
......
...@@ -29,6 +29,7 @@ if(WITH_AMD_GPU) ...@@ -29,6 +29,7 @@ if(WITH_AMD_GPU)
ExternalProject_Add( ExternalProject_Add(
extern_eigen3 extern_eigen3
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/sabreshao/hipeigen.git" GIT_REPOSITORY "https://github.com/sabreshao/hipeigen.git"
GIT_TAG 7cb2b6e5a4b4a1efe658abb215cd866c6fb2275e GIT_TAG 7cb2b6e5a4b4a1efe658abb215cd866c6fb2275e
PREFIX ${EIGEN_SOURCE_DIR} PREFIX ${EIGEN_SOURCE_DIR}
...@@ -42,6 +43,7 @@ else() ...@@ -42,6 +43,7 @@ else()
ExternalProject_Add( ExternalProject_Add(
extern_eigen3 extern_eigen3
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "${EIGEN_GIT_REPOSITORY}" GIT_REPOSITORY "${EIGEN_GIT_REPOSITORY}"
# eigen on cuda9.1 missing header of math_funtions.hpp # eigen on cuda9.1 missing header of math_funtions.hpp
# https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen # https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen
......
...@@ -30,6 +30,7 @@ INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIR}) ...@@ -30,6 +30,7 @@ INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIR})
ExternalProject_Add( ExternalProject_Add(
extern_gflags extern_gflags
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/gflags/gflags.git" GIT_REPOSITORY "https://github.com/gflags/gflags.git"
GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a GIT_TAG 77592648e3f3be87d6c7123eb81cbad75f9aef5a
PREFIX ${GFLAGS_SOURCES_DIR} PREFIX ${GFLAGS_SOURCES_DIR}
......
...@@ -34,6 +34,7 @@ SET(GLOG_TAG "v0.3.5") ...@@ -34,6 +34,7 @@ SET(GLOG_TAG "v0.3.5")
ExternalProject_Add( ExternalProject_Add(
extern_glog extern_glog
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
DEPENDS gflags DEPENDS gflags
GIT_REPOSITORY ${GLOG_REPOSITORY} GIT_REPOSITORY ${GLOG_REPOSITORY}
GIT_TAG ${GLOG_TAG} GIT_TAG ${GLOG_TAG}
......
...@@ -47,6 +47,7 @@ ENDIF() ...@@ -47,6 +47,7 @@ ENDIF()
ExternalProject_Add( ExternalProject_Add(
extern_gtest extern_gtest
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
DEPENDS ${GTEST_DEPENDS} DEPENDS ${GTEST_DEPENDS}
GIT_REPOSITORY "https://github.com/google/googletest.git" GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG "release-1.8.1" GIT_TAG "release-1.8.1"
......
...@@ -23,6 +23,7 @@ INCLUDE_DIRECTORIES(${LEVELDB_INCLUDE_DIR}) ...@@ -23,6 +23,7 @@ INCLUDE_DIRECTORIES(${LEVELDB_INCLUDE_DIR})
ExternalProject_Add( ExternalProject_Add(
extern_leveldb extern_leveldb
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
PREFIX ${LEVELDB_SOURCES_DIR} PREFIX ${LEVELDB_SOURCES_DIR}
GIT_REPOSITORY "https://github.com/google/leveldb" GIT_REPOSITORY "https://github.com/google/leveldb"
GIT_TAG v1.18 GIT_TAG v1.18
......
...@@ -23,6 +23,7 @@ SET(LIBXSMM_LIBS "${LIBXSMM_LIBRARY_DIR}/libxsmm.a" ...@@ -23,6 +23,7 @@ SET(LIBXSMM_LIBS "${LIBXSMM_LIBRARY_DIR}/libxsmm.a"
ExternalProject_Add( ExternalProject_Add(
extern_libxsmm extern_libxsmm
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/hfp/libxsmm.git" GIT_REPOSITORY "https://github.com/hfp/libxsmm.git"
GIT_TAG "7cc03b5b342fdbc6b6d990b190671c5dbb8489a2" GIT_TAG "7cc03b5b342fdbc6b6d990b190671c5dbb8489a2"
PREFIX ${LIBXSMM_SOURCES_DIR} PREFIX ${LIBXSMM_SOURCES_DIR}
......
...@@ -52,6 +52,7 @@ ENDIF(NOT WIN32) ...@@ -52,6 +52,7 @@ ENDIF(NOT WIN32)
ExternalProject_Add( ExternalProject_Add(
${MKLDNN_PROJECT} ${MKLDNN_PROJECT}
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
DEPENDS ${MKLDNN_DEPENDS} DEPENDS ${MKLDNN_DEPENDS}
GIT_REPOSITORY "https://github.com/intel/mkl-dnn.git" GIT_REPOSITORY "https://github.com/intel/mkl-dnn.git"
GIT_TAG "aef88b7c233f48f8b945da310f1b973da31ad033" GIT_TAG "aef88b7c233f48f8b945da310f1b973da31ad033"
......
...@@ -37,6 +37,7 @@ SET(NGRAPH_TBB_LIB ${NGRAPH_LIB_DIR}/${NGRAPH_TBB_LIB_NAME}) ...@@ -37,6 +37,7 @@ SET(NGRAPH_TBB_LIB ${NGRAPH_LIB_DIR}/${NGRAPH_TBB_LIB_NAME})
ExternalProject_Add( ExternalProject_Add(
${NGRAPH_PROJECT} ${NGRAPH_PROJECT}
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
DEPENDS ${MKLDNN_PROJECT} ${MKLML_PROJECT} DEPENDS ${MKLDNN_PROJECT} ${MKLML_PROJECT}
GIT_REPOSITORY ${NGRAPH_GIT_REPO} GIT_REPOSITORY ${NGRAPH_GIT_REPO}
GIT_TAG ${NGRAPH_GIT_TAG} GIT_TAG ${NGRAPH_GIT_TAG}
......
...@@ -47,6 +47,7 @@ IF(NOT ${CBLAS_FOUND}) ...@@ -47,6 +47,7 @@ IF(NOT ${CBLAS_FOUND})
ExternalProject_Add( ExternalProject_Add(
extern_openblas extern_openblas
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
GIT_TAG ${OPENBLAS_COMMIT} GIT_TAG ${OPENBLAS_COMMIT}
PREFIX ${CBLAS_SOURCES_DIR} PREFIX ${CBLAS_SOURCES_DIR}
......
...@@ -209,6 +209,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) ...@@ -209,6 +209,7 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST)
ExternalProject_Add( ExternalProject_Add(
${TARGET_NAME} ${TARGET_NAME}
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
PREFIX ${PROTOBUF_SOURCES_DIR} PREFIX ${PROTOBUF_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
DEPENDS zlib DEPENDS zlib
......
...@@ -21,6 +21,7 @@ include_directories(${PYBIND_SOURCE_DIR}/src/extern_pybind/include) ...@@ -21,6 +21,7 @@ include_directories(${PYBIND_SOURCE_DIR}/src/extern_pybind/include)
ExternalProject_Add( ExternalProject_Add(
extern_pybind extern_pybind
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/pybind/pybind11.git" GIT_REPOSITORY "https://github.com/pybind/pybind11.git"
GIT_TAG "v2.2.4" GIT_TAG "v2.2.4"
PREFIX ${PYBIND_SOURCE_DIR} PREFIX ${PYBIND_SOURCE_DIR}
......
...@@ -28,6 +28,7 @@ SET(ROCPRIM_INCLUDE_DIR ${ROCPRIM_INSTALL_DIR}/include) ...@@ -28,6 +28,7 @@ SET(ROCPRIM_INCLUDE_DIR ${ROCPRIM_INSTALL_DIR}/include)
ExternalProject_Add( ExternalProject_Add(
extern_rocprim extern_rocprim
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/ROCmSoftwarePlatform/rocPRIM.git" GIT_REPOSITORY "https://github.com/ROCmSoftwarePlatform/rocPRIM.git"
GIT_TAG 5bd41b96ab8d8343330fb2c3e1b96775bde3b3fc GIT_TAG 5bd41b96ab8d8343330fb2c3e1b96775bde3b3fc
PREFIX ${ROCPRIM_SOURCE_DIR} PREFIX ${ROCPRIM_SOURCE_DIR}
......
...@@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES(${THREADPOOL_INCLUDE_DIR}) ...@@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES(${THREADPOOL_INCLUDE_DIR})
ExternalProject_Add( ExternalProject_Add(
extern_threadpool extern_threadpool
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/progschj/ThreadPool.git" GIT_REPOSITORY "https://github.com/progschj/ThreadPool.git"
GIT_TAG 9a42ec1329f259a5f4881a291db1dcb8f2ad9040 GIT_TAG 9a42ec1329f259a5f4881a291db1dcb8f2ad9040
PREFIX ${THREADPOOL_SOURCE_DIR} PREFIX ${THREADPOOL_SOURCE_DIR}
......
...@@ -35,6 +35,7 @@ SET(WARPCTC_REPOSITORY "https://github.com/wopeizl/warp-ctc.git") ...@@ -35,6 +35,7 @@ SET(WARPCTC_REPOSITORY "https://github.com/wopeizl/warp-ctc.git")
ExternalProject_Add( ExternalProject_Add(
extern_warpctc extern_warpctc
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY ${WARPCTC_REPOSITORY} GIT_REPOSITORY ${WARPCTC_REPOSITORY}
PREFIX ${WARPCTC_SOURCES_DIR} PREFIX ${WARPCTC_SOURCES_DIR}
UPDATE_COMMAND "" UPDATE_COMMAND ""
......
...@@ -31,6 +31,7 @@ add_definitions(-DXBYAK_NO_OP_NAMES) ...@@ -31,6 +31,7 @@ add_definitions(-DXBYAK_NO_OP_NAMES)
ExternalProject_Add( ExternalProject_Add(
${XBYAK_PROJECT} ${XBYAK_PROJECT}
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
DEPENDS "" DEPENDS ""
GIT_REPOSITORY "https://github.com/herumi/xbyak.git" GIT_REPOSITORY "https://github.com/herumi/xbyak.git"
GIT_TAG "v5.661" # Jul 26th GIT_TAG "v5.661" # Jul 26th
......
...@@ -32,6 +32,7 @@ if(WIN32) ...@@ -32,6 +32,7 @@ if(WIN32)
ExternalProject_Add( ExternalProject_Add(
extern_xxhash extern_xxhash
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/Cyan4973/xxHash" GIT_REPOSITORY "https://github.com/Cyan4973/xxHash"
GIT_TAG "v0.6.5" GIT_TAG "v0.6.5"
PREFIX ${XXHASH_SOURCE_DIR} PREFIX ${XXHASH_SOURCE_DIR}
......
...@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(${THIRD_PARTY_PATH}/install) # For Paddle code to include zl ...@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(${THIRD_PARTY_PATH}/install) # For Paddle code to include zl
ExternalProject_Add( ExternalProject_Add(
extern_zlib extern_zlib
${EXTERNAL_PROJECT_LOG_ARGS} ${EXTERNAL_PROJECT_LOG_ARGS}
${SHALLOW_CLONE}
GIT_REPOSITORY "https://github.com/madler/zlib.git" GIT_REPOSITORY "https://github.com/madler/zlib.git"
GIT_TAG "v1.2.8" GIT_TAG "v1.2.8"
PREFIX ${ZLIB_SOURCES_DIR} PREFIX ${ZLIB_SOURCES_DIR}
......
...@@ -89,6 +89,10 @@ if(WIN32 OR APPLE OR NOT WITH_GPU OR ON_INFER) ...@@ -89,6 +89,10 @@ if(WIN32 OR APPLE OR NOT WITH_GPU OR ON_INFER)
set(WITH_DGC OFF) set(WITH_DGC OFF)
endif() endif()
if(${CMAKE_VERSION} VERSION_GREATER "3.5.2")
set(SHALLOW_CLONE "GIT_SHALLOW TRUE") # adds --depth=1 arg to git clone of External_Projects
endif()
########################### include third_party accoring to flags ############################### ########################### include third_party accoring to flags ###############################
include(external/zlib) # download, build, install zlib include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags include(external/gflags) # download, build, install gflags
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册