mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-24 18:23:26 -03:00
cmake: Build secp256k1
subtree
This commit is contained in:
parent
dbb7ed14e8
commit
db7a198f29
1 changed files with 25 additions and 0 deletions
|
@ -4,3 +4,28 @@
|
|||
|
||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/bitcoin-config.h.in config/bitcoin-config.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
#=============================
|
||||
# secp256k1 subtree
|
||||
#=============================
|
||||
message("")
|
||||
message("Configuring secp256k1 subtree...")
|
||||
set(SECP256K1_DISABLE_SHARED ON CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_ENABLE_MODULE_ECDH OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(SECP256K1_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
|
||||
enable_language(C)
|
||||
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
|
||||
if(config STREQUAL "")
|
||||
continue()
|
||||
endif()
|
||||
string(TOUPPER "${config}" config)
|
||||
set(CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
||||
endforeach()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
|
||||
add_subdirectory(secp256k1)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
|
Loading…
Add table
Reference in a new issue