Skip to content

Commit

Permalink
[feat]: add patches.sh for cmake project
Browse files Browse the repository at this point in the history
  • Loading branch information
dterazhao committed Dec 18, 2023
1 parent c97d610 commit aa28c8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions third_party/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ SSL_PREFIX=$([[ "$1" == "" ]] && echo "$CD" || echo "$1")
rm -rf include lib && mkdir include lib
# build yacl
"$CD"/build_yacl.sh "$SSL_PREFIX"
# patches
"$CD"/patches.sh
3 changes: 3 additions & 0 deletions third_party/patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
CD=$(cd "$(dirname "$0")" || exit && pwd)
cd "$CD" || exit

f_path="include/yacl/math/mpint/mp_int.h"
row_num=$(awk -v pattern="mp_int n_;" '$0 ~ pattern {print NR-1}' "$f_path")
sed -i '' "${row_num}s/protected:/public:/" "$f_path"

0 comments on commit aa28c8c

Please sign in to comment.