Skip to content

Commit

Permalink
fix (#61923) (#62186)
Browse files Browse the repository at this point in the history
Co-authored-by: risemeup1 <62429225+risemeup1@users.noreply.github.com>
  • Loading branch information
tianshuo78520a and risemeup1 authored Feb 28, 2024
1 parent d804975 commit d077553
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 9 additions & 9 deletions cmake/external/cryptopp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 "<SOURCE_DIR>/cmake/"
COMMAND git clone ${GIT_URL}/noloader/cryptopp-cmake "<SOURCE_DIR>/cmake"
COMMAND cd "<SOURCE_DIR>/cmake" && git checkout tags/${CRYPTOPP_TAG} -b
${CRYPTOPP_TAG}
COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/cmake/"
"<SOURCE_DIR>/"
COMMAND ${CMAKE_COMMAND} -E copy "${CRYPTOPP_CMAKE_SOURCE_DIR}/CMakeLists.txt"
"<SOURCE_DIR>/CMakeLists.txt"
COMMAND
${CMAKE_COMMAND} -E copy
"${CRYPTOPP_CMAKE_SOURCE_DIR}/cryptopp-config.cmake"
"<SOURCE_DIR>/cryptopp-config.cmake"
COMMAND ${CRYPTOPP_PATCH_COMMAND}
INSTALL_DIR ${CRYPTOPP_INSTALL_DIR}
CMAKE_ARGS ${CRYPTOPP_CMAKE_ARGS}
Expand Down
1 change: 1 addition & 0 deletions third_party/cryptopp
Submodule cryptopp added at 9dcc26
1 change: 1 addition & 0 deletions third_party/cryptopp-cmake
Submodule cryptopp-cmake added at 6d0666

0 comments on commit d077553

Please sign in to comment.