diff --git a/cmake/external/boost.cmake b/cmake/external/boost.cmake index 0c1ec19a2c29363524732a3edc4e8b8079c580ce..69eb62bfdc65490e8d6ab0b25dee8a5d31efe1fc 100644 --- a/cmake/external/boost.cmake +++ b/cmake/external/boost.cmake @@ -32,12 +32,8 @@ set(BOOST_URL "http://paddlepaddledeps.bj.bcebos.com/${BOOST_TAR}.tar.gz" CACH MESSAGE(STATUS "BOOST_VERSION: ${BOOST_VER}, BOOST_URL: ${BOOST_URL}") set(BOOST_PREFIX_DIR ${THIRD_PARTY_PATH}/boost) -set(BOOST_SOURCE_DIR ${THIRD_PARTY_PATH}/boost/src/extern_boost) -cache_third_party(${BOOST_PROJECT} - URL ${BOOST_URL} - DIR BOOST_SOURCE_DIR) -set(BOOST_INCLUDE_DIR "${BOOST_SOURCE_DIR}" CACHE PATH "boost include directory." FORCE) +set(BOOST_INCLUDE_DIR "${THIRD_PARTY_PATH}/boost/src/extern_boost" CACHE PATH "boost include directory." FORCE) set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) include_directories(${BOOST_INCLUDE_DIR}) @@ -48,11 +44,9 @@ endif() ExternalProject_Add( ${BOOST_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} - "${BOOST_DOWNLOAD_CMD}" + URL ${BOOST_URL} URL_MD5 51be7cc203628dc0848e97eee32d79e3 PREFIX ${BOOST_PREFIX_DIR} - DOWNLOAD_DIR ${BOOST_SOURCE_DIR} - SOURCE_DIR ${BOOST_SOURCE_DIR} DOWNLOAD_NO_PROGRESS 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/external/cryptopp.cmake b/cmake/external/cryptopp.cmake index 4c3bca56f33730f3a2a63ad92b63124edafa39e7..913fbfed316d8e5cc35e2d93a80ed720f549442d 100644 --- a/cmake/external/cryptopp.cmake +++ b/cmake/external/cryptopp.cmake @@ -59,7 +59,6 @@ ExternalProject_Add( GIT_REPOSITORY ${CRYPTOPP_REPOSITORY} GIT_TAG ${CRYPTOPP_TAG} PREFIX ${CRYPTOPP_PREFIX_DIR} - SOURCE_DIR ${CRYPTOPP_SOURCE_DIR} UPDATE_COMMAND "" PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E remove_directory "/cmake/" diff --git a/cmake/external/dgc.cmake b/cmake/external/dgc.cmake index 655611e06e26f6e787f4329a824645be106512b7..711d6c5b10aacc89018cfa8ae39a9ac5a5ed5951 100644 --- a/cmake/external/dgc.cmake +++ b/cmake/external/dgc.cmake @@ -28,7 +28,6 @@ ExternalProject_Add( URL ${DGC_URL} URL_MD5 "94e6fa1bc97169d0e1aad44570fe3251" PREFIX "${DGC_PREFIX_DIR}" - SOURCE_DIR "${DGC_SOURCES_DIR}" CONFIGURE_COMMAND "" BUILD_COMMAND make -j $(nproc) INSTALL_COMMAND mkdir -p ${DGC_INSTALL_DIR}/lib/ ${DGC_INCLUDE_DIR}/dgc diff --git a/cmake/external/dlpack.cmake b/cmake/external/dlpack.cmake index be97a026e23e35d626dbfc982783bffc170f86b7..60a4ecb0bf97e4dea44c1d948204f8066f151736 100644 --- a/cmake/external/dlpack.cmake +++ b/cmake/external/dlpack.cmake @@ -15,12 +15,11 @@ include(ExternalProject) set(DLPACK_PREFIX_DIR ${THIRD_PARTY_PATH}/dlpack) -set(DLPACK_SOURCE_DIR ${THIRD_PARTY_PATH}/dlpack/src/extern_dlpack) set(DLPACK_REPOSITORY ${GIT_URL}/dmlc/dlpack.git) set(DLPACK_TAG v0.4) -set(DLPACK_INCLUDE_DIR ${DLPACK_SOURCE_DIR}/include) +set(DLPACK_INCLUDE_DIR ${THIRD_PARTY_PATH}/dlpack/src/extern_dlpack/include) include_directories(${DLPACK_INCLUDE_DIR}) ExternalProject_Add( @@ -30,7 +29,6 @@ ExternalProject_Add( GIT_REPOSITORY ${DLPACK_REPOSITORY} GIT_TAG ${DLPACK_TAG} PREFIX ${DLPACK_PREFIX_DIR} - SOURCE_DIR ${DLPACK_SOURCE_DIR} UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake index 9293b3ebcedf352ef98947edacdec4c99f1db49a..f8bac96b68fa59488bc87f942ef22ecd3590e0b1 100644 --- a/cmake/external/eigen.cmake +++ b/cmake/external/eigen.cmake @@ -44,7 +44,6 @@ ExternalProject_Add( 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 e4e475720604f9a67f0974da87d772db678a60d6..a445633f989cf5039c73fcacf3da57002cca51a7 100644 --- a/cmake/external/gflags.cmake +++ b/cmake/external/gflags.cmake @@ -15,7 +15,6 @@ INCLUDE(ExternalProject) SET(GFLAGS_PREFIX_DIR ${THIRD_PARTY_PATH}/gflags) -SET(GFLAGS_SOURCE_DIR ${THIRD_PARTY_PATH}/gflags/src/extern_gflags) SET(GFLAGS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gflags) SET(GFLAGS_INCLUDE_DIR "${GFLAGS_INSTALL_DIR}/include" CACHE PATH "gflags include directory." FORCE) set(GFLAGS_REPOSITORY ${GIT_URL}/gflags/gflags.git) @@ -38,7 +37,6 @@ ExternalProject_Add( GIT_TAG ${GFLAGS_TAG} PREFIX ${GFLAGS_PREFIX_DIR} UPDATE_COMMAND "" - SOURCE_DIR ${GFLAGS_SOURCE_DIR} BUILD_COMMAND ${BUILD_COMMAND} INSTALL_COMMAND ${INSTALL_COMMAND} CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} diff --git a/cmake/external/glog.cmake b/cmake/external/glog.cmake index 2897b54bd62993840d37361576632b18d9264aa2..455f81b041ea6796582b628ce4a2ee8777a5c589 100644 --- a/cmake/external/glog.cmake +++ b/cmake/external/glog.cmake @@ -15,7 +15,6 @@ INCLUDE(ExternalProject) SET(GLOG_PREFIX_DIR ${THIRD_PARTY_PATH}/glog) -SET(GLOG_SOURCE_DIR ${THIRD_PARTY_PATH}/glog/src/extern_glog) SET(GLOG_INSTALL_DIR ${THIRD_PARTY_PATH}/install/glog) SET(GLOG_INCLUDE_DIR "${GLOG_INSTALL_DIR}/include" CACHE PATH "glog include directory." FORCE) SET(GLOG_REPOSITORY ${GIT_URL}/google/glog.git) @@ -40,7 +39,6 @@ ExternalProject_Add( GIT_TAG ${GLOG_TAG} DEPENDS gflags PREFIX ${GLOG_PREFIX_DIR} - SOURCE_DIR ${GLOG_SOURCE_DIR} UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} diff --git a/cmake/external/gloo.cmake b/cmake/external/gloo.cmake index 8d4b0c4ebf0e719c5c37749bae93838875a3b892..3b88e67f69fb37529c8d2785b2f2442a6a40ddb3 100644 --- a/cmake/external/gloo.cmake +++ b/cmake/external/gloo.cmake @@ -16,7 +16,7 @@ INCLUDE(ExternalProject) SET(GLOO_PROJECT "extern_gloo") SET(GLOO_PREFIX_DIR ${THIRD_PARTY_PATH}/gloo) -SET(GLOO_SOURCE_DIR ${THIRD_PARTY_PATH}/gloo/src/extern_gloo/gloo) +SET(GLOO_SOURCE_DIR ${THIRD_PARTY_PATH}/gloo/src/extern_gloo) SET(GLOO_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gloo) SET(GLOO_INCLUDE_DIR "${GLOO_INSTALL_DIR}/include" CACHE PATH "gloo include directory." FORCE) SET(GLOO_LIBRARY_DIR "${GLOO_INSTALL_DIR}/lib" CACHE PATH "gloo library directory." FORCE) @@ -29,13 +29,12 @@ INCLUDE_DIRECTORIES(${GLOO_INCLUDE_DIR}) if(WITH_ASCEND OR WITH_ASCEND_CL) ExternalProject_Add( - extern_gloo + ${GLOO_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} GIT_REPOSITORY ${GLOO_REPOSITORY} GIT_TAG ${GLOO_TAG} PREFIX "${GLOO_PREFIX_DIR}" - SOURCE_DIR "${GLOO_SOURCE_DIR}" UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND mkdir -p ${GLOO_SOURCE_DIR}/build @@ -47,13 +46,12 @@ if(WITH_ASCEND OR WITH_ASCEND_CL) ) else() ExternalProject_Add( - extern_gloo + ${GLOO_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} GIT_REPOSITORY ${GLOO_REPOSITORY} GIT_TAG ${GLOO_TAG} PREFIX "${GLOO_PREFIX_DIR}" - SOURCE_DIR "${GLOO_SOURCE_DIR}" UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND mkdir -p ${GLOO_SOURCE_DIR}/build diff --git a/cmake/external/gtest.cmake b/cmake/external/gtest.cmake index 9758d8a7e4cafda8ae8de7d419cef203afe0a511..e6bda2f8195fa7f66900953167c12ab1e0209d94 100644 --- a/cmake/external/gtest.cmake +++ b/cmake/external/gtest.cmake @@ -22,11 +22,10 @@ INCLUDE(GNUInstallDirs) INCLUDE(ExternalProject) SET(GTEST_PREFIX_DIR ${THIRD_PARTY_PATH}/gtest) -SET(GTEST_SOURCE_DIR ${THIRD_PARTY_PATH}/gtest/src/extern_gtest) SET(GTEST_INSTALL_DIR ${THIRD_PARTY_PATH}/install/gtest) SET(GTEST_INCLUDE_DIR "${GTEST_INSTALL_DIR}/include" CACHE PATH "gtest include directory." FORCE) -set(GTEST_REPOSITORY ${GIT_URL}/google/googletest.git) -set(GTEST_TAG release-1.8.1) +set(GTEST_REPOSITORY ${GIT_URL}/google/googletest.git) +set(GTEST_TAG release-1.8.1) INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIR}) @@ -55,7 +54,6 @@ ExternalProject_Add( GIT_TAG ${GTEST_TAG} DEPENDS ${GTEST_DEPENDS} PREFIX ${GTEST_PREFIX_DIR} - SOURCE_DIR ${GTEST_SOURCE_DIR} UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} diff --git a/cmake/external/mkldnn.cmake b/cmake/external/mkldnn.cmake index d004354338ffa1c7fe925171273a241abc462b59..945f2965d764557edf0117f3c92e3d7daeef287e 100644 --- a/cmake/external/mkldnn.cmake +++ b/cmake/external/mkldnn.cmake @@ -16,7 +16,6 @@ INCLUDE(ExternalProject) SET(MKLDNN_PROJECT "extern_mkldnn") SET(MKLDNN_PREFIX_DIR ${THIRD_PARTY_PATH}/mkldnn) -SET(MKLDNN_SOURCE_DIR ${THIRD_PARTY_PATH}/mkldnn/src/extern_mkldnn) SET(MKLDNN_INSTALL_DIR ${THIRD_PARTY_PATH}/install/mkldnn) SET(MKLDNN_INC_DIR "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE) SET(MKLDNN_REPOSITORY ${GIT_URL}/oneapi-src/oneDNN.git) @@ -57,7 +56,6 @@ ExternalProject_Add( GIT_TAG ${MKLDNN_TAG} DEPENDS ${MKLDNN_DEPENDS} PREFIX ${MKLDNN_PREFIX_DIR} - SOURCE_DIR ${MKLDNN_SOURCE_DIR} UPDATE_COMMAND "" #BUILD_ALWAYS 1 CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} diff --git a/cmake/external/mklml.cmake b/cmake/external/mklml.cmake index a4df5756ce015d14e0a366643ed6e0c45385657c..3b9a88cc6c37bd5a1321ff8edd08e7b7921e6c0f 100644 --- a/cmake/external/mklml.cmake +++ b/cmake/external/mklml.cmake @@ -13,12 +13,9 @@ # limitations under the License. INCLUDE(ExternalProject) -SET(MKLML_DST_DIR "mklml") -SET(MKLML_INSTALL_ROOT "${THIRD_PARTY_PATH}/install") -SET(MKLML_INSTALL_DIR ${MKLML_INSTALL_ROOT}/${MKLML_DST_DIR}) -SET(MKLML_ROOT ${MKLML_INSTALL_DIR}) -SET(MKLML_INC_DIR ${MKLML_ROOT}/include) -SET(MKLML_LIB_DIR ${MKLML_ROOT}/lib) +SET(MKLML_INSTALL_DIR ${THIRD_PARTY_PATH}/install/mklml) +SET(MKLML_INC_DIR ${MKLML_INSTALL_DIR}/include) +SET(MKLML_LIB_DIR ${MKLML_INSTALL_DIR}/lib) SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" "${MKLML_ROOT}/lib") IF(WIN32) @@ -46,10 +43,6 @@ MESSAGE(STATUS "MKLML_VER: ${MKLML_VER}, MKLML_URL: ${MKLML_URL}") SET(MKLML_PREFIX_DIR ${THIRD_PARTY_PATH}/mklml) SET(MKLML_SOURCE_DIR ${THIRD_PARTY_PATH}/mklml/src/extern_mklml) -cache_third_party(${MKLML_PROJECT} - URL ${MKLML_URL} - DIR MKLML_SOURCE_DIR) - # Ninja Generator can not establish the correct dependency relationship between the imported library with target, # the product file in the ExternalProject need to be specified manually, please refer to # https://stackoverflow.com/questions/54866067/cmake-and-ninja-missing-and-no-known-rule-to-make-it @@ -57,11 +50,9 @@ cache_third_party(${MKLML_PROJECT} ExternalProject_Add( ${MKLML_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} - "${MKLML_DOWNLOAD_CMD}" + URL ${MKLML_URL} URL_MD5 ${MKLML_URL_MD5} PREFIX ${MKLML_PREFIX_DIR} - DOWNLOAD_DIR ${MKLML_SOURCE_DIR} - SOURCE_DIR ${MKLML_SOURCE_DIR} DOWNLOAD_NO_PROGRESS 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index a6033a20c6fb06c6e6b26100c1997b7881767e85..e9180c4fc9bb43cd2070e5bc93c74c7a9ee6510a 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -15,7 +15,6 @@ INCLUDE(ExternalProject) SET(CBLAS_PREFIX_DIR ${THIRD_PARTY_PATH}/openblas) -SET(CBLAS_SOURCE_DIR ${THIRD_PARTY_PATH}/openblas/src/extern_openblas) SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas) SET(CBLAS_REPOSITORY ${GIT_URL}/xianyi/OpenBLAS.git) SET(CBLAS_TAG v0.3.7) @@ -27,11 +26,6 @@ if(WITH_MIPS) SET(CBLAS_TAG v0.3.13) endif() -cache_third_party(extern_openblas - REPOSITORY ${CBLAS_REPOSITORY} - TAG ${CBLAS_TAG} - DIR CBLAS_SOURCE_DIR) - IF(NOT WIN32) SET(CBLAS_LIBRARIES "${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}" @@ -52,9 +46,9 @@ IF(NOT WIN32) extern_openblas ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${OPENBLAS_DOWNLOAD_CMD}" + GIT_REPOSITORY ${CBLAS_REPOSITORY} + GIT_TAG ${CBLAS_TAG} PREFIX ${CBLAS_PREFIX_DIR} - SOURCE_DIR ${CBLAS_SOURCE_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR} BUILD_IN_SOURCE 1 BUILD_COMMAND make -j$(nproc) ${COMMON_ARGS} ${OPTIONAL_ARGS} @@ -70,9 +64,9 @@ ELSE(NOT WIN32) ExternalProject_Add( extern_openblas ${EXTERNAL_PROJECT_LOG_ARGS} - "${OPENBLAS_DOWNLOAD_CMD}" + GIT_REPOSITORY ${CBLAS_REPOSITORY} + GIT_TAG ${CBLAS_TAG} PREFIX ${CBLAS_PREFIX_DIR} - SOURCE_DIR ${CBLAS_SOURCE_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR} BUILD_IN_SOURCE 0 UPDATE_COMMAND "" diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 8a9bc6e42c1464b1291396f017fe7a11ac45806e..86acd1a00125048ca4dfcb9cd93eb11a0cc0fb74 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -209,18 +209,13 @@ FUNCTION(build_protobuf TARGET_NAME BUILD_FOR_HOST) SET(PROTOBUF_TAG 9f75c5aa851cd877fb0d93ccc31b8567a6706546) endif() - cache_third_party(${TARGET_NAME} - REPOSITORY ${PROTOBUF_REPOSITORY} - TAG ${PROTOBUF_TAG} - DIR PROTOBUF_SOURCE_DIR) - ExternalProject_Add( ${TARGET_NAME} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${PROTOBUF_DOWNLOAD_CMD}" + GIT_REPOSITORY ${PROTOBUF_REPOSITORY} + GIT_TAG ${PROTOBUF_TAG} PREFIX ${PROTOBUF_PREFIX_DIR} - SOURCE_DIR ${PROTOBUF_SOURCE_DIR} UPDATE_COMMAND "" DEPENDS zlib CONFIGURE_COMMAND diff --git a/cmake/external/pybind11.cmake b/cmake/external/pybind11.cmake index 353cb5c72fdfb9ebc88347a4a34aeb1ad85e828e..f87e73081ffb777c3f93513a8f58ccfe9b0e1139 100644 --- a/cmake/external/pybind11.cmake +++ b/cmake/external/pybind11.cmake @@ -15,25 +15,19 @@ include(ExternalProject) set(PYBIND_PREFIX_DIR ${THIRD_PARTY_PATH}/pybind) -set(PYBIND_SOURCE_DIR ${THIRD_PARTY_PATH}/pybind/src/extern_pybind) SET(PYBIND_REPOSITORY ${GIT_URL}/pybind/pybind11.git) SET(PYBIND_TAG v2.4.3) -cache_third_party(extern_pybind - REPOSITORY ${PYBIND_REPOSITORY} - TAG ${PYBIND_TAG} - DIR PYBIND_SOURCE_DIR) - -set(PYBIND_INCLUDE_DIR ${PYBIND_SOURCE_DIR}/include) +set(PYBIND_INCLUDE_DIR ${THIRD_PARTY_PATH}/pybind/src/extern_pybind/include) include_directories(${PYBIND_INCLUDE_DIR}) ExternalProject_Add( extern_pybind ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${PYBIND_DOWNLOAD_CMD}" + GIT_REPOSITORY ${PYBIND_REPOSITORY} + GIT_TAG ${PYBIND_TAG} PREFIX ${PYBIND_PREFIX_DIR} - SOURCE_DIR ${PYBIND_SOURCE_DIR} # If we explicitly leave the `UPDATE_COMMAND` of the ExternalProject_Add # function in CMakeLists blank, it will cause another parameter GIT_TAG # to be modified without triggering incremental compilation, and the diff --git a/cmake/external/threadpool.cmake b/cmake/external/threadpool.cmake index f9cb3a9075a821025129c1f6acb479a4ad6ac95c..c4d978115bfb2381074a9f8f6fb0b7b5cbe35af2 100644 --- a/cmake/external/threadpool.cmake +++ b/cmake/external/threadpool.cmake @@ -15,7 +15,6 @@ INCLUDE(ExternalProject) SET(THREADPOOL_PREFIX_DIR ${THIRD_PARTY_PATH}/threadpool) -SET(THREADPOOL_SOURCE_DIR ${THIRD_PARTY_PATH}/threadpool/src/extern_threadpool) if(WITH_ASCEND OR WITH_ASCEND_CL) SET(THREADPOOL_REPOSITORY https://gitee.com/tianjianhe/ThreadPool.git) else() @@ -23,21 +22,16 @@ else() endif() SET(THREADPOOL_TAG 9a42ec1329f259a5f4881a291db1dcb8f2ad9040) -cache_third_party(extern_threadpool - REPOSITORY ${THREADPOOL_REPOSITORY} - TAG ${THREADPOOL_TAG} - DIR THREADPOOL_SOURCE_DIR) - -SET(THREADPOOL_INCLUDE_DIR ${THREADPOOL_SOURCE_DIR}) +SET(THREADPOOL_INCLUDE_DIR ${THIRD_PARTY_PATH}/threadpool/src/extern_threadpool) INCLUDE_DIRECTORIES(${THREADPOOL_INCLUDE_DIR}) ExternalProject_Add( extern_threadpool ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${THREADPOOL_DOWNLOAD_CMD}" + GIT_REPOSITORY ${THREADPOOL_REPOSITORY} + GIT_TAG ${THREADPOOL_TAG} PREFIX ${THREADPOOL_PREFIX_DIR} - SOURCE_DIR ${THREADPOOL_SOURCE_DIR} UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/external/warpctc.cmake b/cmake/external/warpctc.cmake index 532ebaaf5c0643a86fcf24022d0084fb572877b5..f0d16fc7978e8df98ec2ed362c750f8e6f97c4be 100644 --- a/cmake/external/warpctc.cmake +++ b/cmake/external/warpctc.cmake @@ -19,7 +19,6 @@ IF(WITH_ROCM) ENDIF() SET(WARPCTC_PREFIX_DIR ${THIRD_PARTY_PATH}/warpctc) -SET(WARPCTC_SOURCE_DIR ${THIRD_PARTY_PATH}/warpctc/src/extern_warpctc) SET(WARPCTC_INSTALL_DIR ${THIRD_PARTY_PATH}/install/warpctc) # in case of low internet speed #set(WARPCTC_REPOSITORY https://gitee.com/tianjianhe/warp-ctc.git) @@ -46,19 +45,14 @@ ELSE() SET(USE_OMP ON) ENDIF() -cache_third_party(extern_warpctc - REPOSITORY ${WARPCTC_REPOSITORY} - TAG ${WARPCTC_TAG} - DIR WARPCTC_SOURCE_DIR) - if(WITH_ASCEND OR WITH_ASCEND_CL) ExternalProject_Add( extern_warpctc ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${WARPCTC_DOWNLOAD_CMD}" + GIT_REPOSITORY ${WARPCTC_REPOSITORY} + GIT_TAG ${WARPCTC_TAG} PREFIX ${WARPCTC_PREFIX_DIR} - SOURCE_DIR ${WARPCTC_SOURCE_DIR} #UPDATE_COMMAND "" PATCH_COMMAND "" BUILD_ALWAYS 1 @@ -106,9 +100,9 @@ else() extern_warpctc ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${WARPCTC_DOWNLOAD_CMD}" + GIT_REPOSITORY ${WARPCTC_REPOSITORY} + GIT_TAG ${WARPCTC_TAG} PREFIX ${WARPCTC_PREFIX_DIR} - SOURCE_DIR ${WARPCTC_SOURCE_DIR} UPDATE_COMMAND "" PATCH_COMMAND "" #BUILD_ALWAYS 1 diff --git a/cmake/external/xbyak.cmake b/cmake/external/xbyak.cmake index 24cccb26b4bf10aac838a9ceaa5ebdc269013acb..6ad15b3730d1db611a9343a55c8927c20ed4df5e 100644 --- a/cmake/external/xbyak.cmake +++ b/cmake/external/xbyak.cmake @@ -16,7 +16,6 @@ include(ExternalProject) set(XBYAK_PROJECT extern_xbyak) set(XBYAK_PREFIX_DIR ${THIRD_PARTY_PATH}/xbyak) -SET(XBYAK_SOURCE_DIR ${THIRD_PARTY_PATH}/xbyak/src/extern_xbyak) set(XBYAK_INSTALL_ROOT ${THIRD_PARTY_PATH}/install/xbyak) set(XBYAK_INC_DIR ${XBYAK_INSTALL_ROOT}/include) set(XBYAK_REPOSITORY ${GIT_URL}/herumi/xbyak.git) @@ -31,19 +30,14 @@ add_definitions(-DPADDLE_WITH_XBYAK) add_definitions(-DXBYAK64) add_definitions(-DXBYAK_NO_OP_NAMES) -cache_third_party(${XBYAK_PROJECT} - REPOSITORY ${XBYAK_REPOSITORY} - TAG ${XBYAK_TAG} - DIR XBYAK_SOURCE_DIR) - ExternalProject_Add( ${XBYAK_PROJECT} ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${XBYAK_DOWNLOAD_CMD}" + GIT_REPOSITORY ${XBYAK_REPOSITORY} + GIT_TAG ${XBYAK_TAG} DEPENDS "" PREFIX ${XBYAK_PREFIX_DIR} - SOURCE_DIR ${XBYAK_SOURCE_DIR} UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${XBYAK_INSTALL_ROOT} -DCMAKE_BUILD_TYPE=${THIRD_PARTY_BUILD_TYPE} diff --git a/cmake/external/xxhash.cmake b/cmake/external/xxhash.cmake index 0279d4e2a835c2c1fa2bf8e2f4cafd21391accfc..d0af472c3e117de872b29b0ca2897b964ed6a93e 100644 --- a/cmake/external/xxhash.cmake +++ b/cmake/external/xxhash.cmake @@ -35,19 +35,14 @@ else() set(XXHASH_LIBRARIES "${XXHASH_INSTALL_DIR}/lib/libxxhash.a") endif () -cache_third_party(extern_xxhash - REPOSITORY ${XXHASH_REPOSITORY} - TAG ${XXHASH_TAG} - DIR XXHASH_SOURCE_DIR) - if(WIN32) ExternalProject_Add( extern_xxhash ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${XXHASH_DOWNLOAD_CMD}" + GIT_REPOSITORY ${XXHASH_REPOSITORY} + GIT_TAG ${XXHASH_TAG} PREFIX ${XXHASH_PREFIX_DIR} - SOURCE_DIR ${XXHASH_SOURCE_DIR} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND @@ -68,9 +63,9 @@ else() ExternalProject_Add( extern_xxhash ${EXTERNAL_PROJECT_LOG_ARGS} - "${XXHASH_DOWNLOAD_CMD}" + GIT_REPOSITORY ${XXHASH_REPOSITORY} + GIT_TAG ${XXHASH_TAG} PREFIX ${XXHASH_PREFIX_DIR} - SOURCE_DIR ${XXHASH_SOURCE_DIR} UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 diff --git a/cmake/external/zlib.cmake b/cmake/external/zlib.cmake index f1a015f6304a386fcc4cb985e4d0523d0d8eabb6..679e2064699e1c3298c050a0104d65acff2fe8de 100644 --- a/cmake/external/zlib.cmake +++ b/cmake/external/zlib.cmake @@ -15,7 +15,6 @@ INCLUDE(ExternalProject) SET(ZLIB_PREFIX_DIR ${THIRD_PARTY_PATH}/zlib) -SET(ZLIB_SOURCE_DIR ${THIRD_PARTY_PATH}/zlib/src/extern_zlib) SET(ZLIB_INSTALL_DIR ${THIRD_PARTY_PATH}/install/zlib) SET(ZLIB_ROOT ${ZLIB_INSTALL_DIR} CACHE FILEPATH "zlib root directory." FORCE) SET(ZLIB_INCLUDE_DIR "${ZLIB_INSTALL_DIR}/include" CACHE PATH "zlib include directory." FORCE) @@ -31,18 +30,13 @@ ELSE(WIN32) SET(ZLIB_LIBRARIES "${ZLIB_INSTALL_DIR}/lib/libz.a" CACHE FILEPATH "zlib library." FORCE) ENDIF(WIN32) -cache_third_party(extern_zlib - REPOSITORY ${ZLIB_REPOSITORY} - TAG ${ZLIB_TAG} - DIR ZLIB_SOURCE_DIR) - ExternalProject_Add( extern_zlib ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - "${ZLIB_DOWNLOAD_CMD}" + GIT_REPOSITORY ${ZLIB_REPOSITORY} + GIT_TAG ${ZLIB_TAG} PREFIX ${ZLIB_PREFIX_DIR} - SOURCE_DIR ${ZLIB_SOURCE_DIR} UPDATE_COMMAND "" CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}