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

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

* make third_party's cmake get source code directly 2

* modify according to zhouwei's comment

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