-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1427 from ton-blockchain/testnet
Merge developer branch
- Loading branch information
Showing
199 changed files
with
7,257 additions
and
2,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
if (NOT SECP256K1_LIBRARY) | ||
|
||
set(SECP256K1_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third-party/secp256k1) | ||
set(SECP256K1_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/secp256k1) | ||
set(SECP256K1_INCLUDE_DIR ${SECP256K1_BINARY_DIR}/include) | ||
|
||
file(MAKE_DIRECTORY ${SECP256K1_BINARY_DIR}) | ||
file(MAKE_DIRECTORY "${SECP256K1_BINARY_DIR}/include") | ||
|
||
if (MSVC) | ||
set(SECP256K1_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third-party/secp256k1) | ||
set(SECP256K1_LIBRARY ${SECP256K1_SOURCE_DIR}/build/src/Release/libsecp256k1.lib) | ||
set(SECP256K1_INCLUDE_DIR ${SECP256K1_BINARY_DIR}/include) | ||
add_custom_command( | ||
WORKING_DIRECTORY ${SECP256K1_SOURCE_DIR} | ||
COMMAND cmake -E env CFLAGS="/WX" cmake -A x64 -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_ENABLE_MODULE_EXTRAKEYS=ON -DSECP256K1_BUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF | ||
COMMAND cmake --build build --config Release | ||
COMMENT "Build Secp256k1" | ||
DEPENDS ${SECP256K1_SOURCE_DIR} | ||
OUTPUT ${SECP256K1_LIBRARY} | ||
) | ||
elseif (EMSCRIPTEN) | ||
set(SECP256K1_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third-party/secp256k1) | ||
set(SECP256K1_LIBRARY ${SECP256K1_BINARY_DIR}/.libs/libsecp256k1.a) | ||
set(SECP256K1_INCLUDE_DIR ${SECP256K1_SOURCE_DIR}/include) | ||
add_custom_command( | ||
WORKING_DIRECTORY ${SECP256K1_SOURCE_DIR} | ||
COMMAND ./autogen.sh | ||
COMMAND emconfigure ./configure --enable-module-recovery --enable-module-extrakeys --disable-tests --disable-benchmark | ||
COMMAND emmake make clean | ||
COMMAND emmake make | ||
COMMENT "Build Secp256k1 with emscripten" | ||
DEPENDS ${SECP256K1_SOURCE_DIR} | ||
OUTPUT ${SECP256K1_LIBRARY} | ||
) | ||
else() | ||
if (NOT NIX) | ||
set(SECP256K1_LIBRARY ${SECP256K1_BINARY_DIR}/lib/libsecp256k1.a) | ||
add_custom_command( | ||
WORKING_DIRECTORY ${SECP256K1_SOURCE_DIR} | ||
COMMAND ./autogen.sh | ||
COMMAND ./configure -q --disable-option-checking --enable-module-recovery --enable-module-extrakeys --prefix ${SECP256K1_BINARY_DIR} --with-pic --disable-shared --enable-static --disable-tests --disable-benchmark | ||
COMMAND make -j16 | ||
COMMAND make install | ||
COMMENT "Build secp256k1" | ||
DEPENDS ${SECP256K1_SOURCE_DIR} | ||
OUTPUT ${SECP256K1_LIBRARY} | ||
) | ||
endif() | ||
endif() | ||
else() | ||
message(STATUS "Use Secp256k1: ${SECP256K1_LIBRARY}") | ||
endif() | ||
|
||
add_custom_target(secp256k1 DEPENDS ${SECP256K1_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.