From a2158167fc3a481dad900ff49b57cfd482909b58 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Wed, 21 Feb 2024 08:15:09 +0000 Subject: [PATCH] fix --- .gitmodules | 8 ++++++++ cmake/external/cryptopp.cmake | 18 +++++++++--------- third_party/cryptopp | 1 + third_party/cryptopp-cmake | 1 + 4 files changed, 19 insertions(+), 9 deletions(-) create mode 160000 third_party/cryptopp create mode 160000 third_party/cryptopp-cmake diff --git a/.gitmodules b/.gitmodules index 8b06f4fb771cb..0c41450793fc2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -110,3 +110,11 @@ path = third_party/cccl url = https://github.com/NVIDIA/cccl.git ignore = dirty +[submodule "third_party/cryptopp"] + path = third_party/cryptopp + url = https://github.com/weidai11/cryptopp.git + ignore = dirty +[submodule "third_party/cryptopp-cmake"] + path = third_party/cryptopp-cmake + url = https://github.com/noloader/cryptopp-cmake.git + ignore = dirty diff --git a/cmake/external/cryptopp.cmake b/cmake/external/cryptopp.cmake index 9daa4be7468e4..b3ec8f622923f 100644 --- a/cmake/external/cryptopp.cmake +++ b/cmake/external/cryptopp.cmake @@ -14,12 +14,13 @@ include(ExternalProject) +set(CRYPTOPP_SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/cryptopp) +set(CRYPTOPP_CMAKE_SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/cryptopp-cmake) set(CRYPTOPP_PREFIX_DIR ${THIRD_PARTY_PATH}/cryptopp) set(CRYPTOPP_INSTALL_DIR ${THIRD_PARTY_PATH}/install/cryptopp) set(CRYPTOPP_INCLUDE_DIR "${CRYPTOPP_INSTALL_DIR}/include" CACHE PATH "cryptopp include directory." FORCE) -set(CRYPTOPP_REPOSITORY ${GIT_URL}/weidai11/cryptopp.git) set(CRYPTOPP_TAG CRYPTOPP_8_2_0) if(WIN32) @@ -63,17 +64,16 @@ include_directories(${CRYPTOPP_INCLUDE_DIR}) ExternalProject_Add( extern_cryptopp ${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} - 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/" - COMMAND git clone ${GIT_URL}/noloader/cryptopp-cmake "/cmake" - COMMAND cd "/cmake" && git checkout tags/${CRYPTOPP_TAG} -b - ${CRYPTOPP_TAG} - COMMAND ${CMAKE_COMMAND} -E copy_directory "/cmake/" - "/" + COMMAND ${CMAKE_COMMAND} -E copy "${CRYPTOPP_CMAKE_SOURCE_DIR}/CMakeLists.txt" + "/CMakeLists.txt" + COMMAND + ${CMAKE_COMMAND} -E copy + "${CRYPTOPP_CMAKE_SOURCE_DIR}/cryptopp-config.cmake" + "/cryptopp-config.cmake" COMMAND ${CRYPTOPP_PATCH_COMMAND} INSTALL_DIR ${CRYPTOPP_INSTALL_DIR} CMAKE_ARGS ${CRYPTOPP_CMAKE_ARGS} diff --git a/third_party/cryptopp b/third_party/cryptopp new file mode 160000 index 0000000000000..9dcc26c58213a --- /dev/null +++ b/third_party/cryptopp @@ -0,0 +1 @@ +Subproject commit 9dcc26c58213abb8351fbb1b2a7a1d2c667366e4 diff --git a/third_party/cryptopp-cmake b/third_party/cryptopp-cmake new file mode 160000 index 0000000000000..6d0666c457fbb --- /dev/null +++ b/third_party/cryptopp-cmake @@ -0,0 +1 @@ +Subproject commit 6d0666c457fbbf6f81819fd2b80f0cb5b6646593