Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
cryptocurrency
bls-dash
bls-dash-system-relic.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bls-dash-system-relic.patch of Package bls-dash
From 1d8dbdd03336b13d445e108ed8bf9a6f757d4e3e Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Fri, 26 Aug 2022 00:04:45 +0300 Subject: [PATCH] Use system relic library. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- CMakeLists.txt | 44 +------------------------------------------- src/CMakeLists.txt | 7 ++----- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db9636b..1183340 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,45 +37,10 @@ set(SODIUM_PCH "on" CACHE STRING "") set(SODIUM_DISABLE_TESTS "on" CACHE STRING "") set(SODIUM_CHIA_MINIMAL "on" CACHE STRING "") -if (DEFINED ENV{RELIC_MAIN}) - set(RELIC_GIT_TAG "origin/main") -else () - # This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5 - set(RELIC_GIT_TAG "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7") -endif () - -message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}") - -FetchContent_Declare( - relic - GIT_REPOSITORY https://github.com/Chia-Network/relic.git - GIT_TAG ${RELIC_GIT_TAG} -) - # Relic related options +find_package(relic REQUIRED) -set(STBIN TRUE) find_package(gmp) -if (GMP_FOUND) - message(STATUS "Found libgmp") - set(ARITH "gmp" CACHE STRING "") -else() - set(ARITH "easy" CACHE STRING "") -endif() - -if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(WSIZE "32" CACHE STRING "Relic - Processor word size") -else() - set(WSIZE "64" CACHE STRING "Relic - Processor word size") -endif() - -if(EMSCRIPTEN) - # emscripten needs arch set to be none since it can't compile assembly - set(ARCH "" CACHE STRING "") - # emscripten is a 32 bit compiler - set(WSIZE "32" CACHE STRING "Relic - Processor word size") -endif() - if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(TIMER "ANSI" CACHE STRING "") set(MULTI "" CACHE STRING "") @@ -116,17 +81,10 @@ set(FP_PMERS "off" CACHE STRING "") set(FPX_METHD "INTEG;INTEG;LAZYR" CACHE STRING "") set(EP_PLAIN "off" CACHE STRING "") set(EP_SUPER "off" CACHE STRING "") -# Disable relic tests and benchmarks -set(TESTS "0" CACHE STRING "Relic - Number of times each test is ran") -set(BENCH "0" CACHE STRING "Relic - Number of times each benchmark is ran") - -set(QUIET "on" CACHE STRING "Relic - Build with printing disabled") set(PP_EXT "LAZYR" CACHE STRING "") set(PP_METHD "LAZYR;OATEP" CACHE STRING "") -FetchContent_MakeAvailable(relic) - add_subdirectory(src) if(EMSCRIPTEN) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index df56c57..d5afd7a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,8 +18,7 @@ target_include_directories(bls-dash PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} $<$<BOOL:${GMP_FOUND}>:${GMP_INCLUDES}> - ${relic_SOURCE_DIR}/include - ${relic_BINARY_DIR}/include + ${RLC_INCLUDE_DIR}/relic ) target_compile_definitions(bls-dash @@ -29,12 +28,10 @@ target_compile_definitions(bls-dash target_link_libraries(bls-dash PUBLIC - relic_s + ${RLC_LIBRARY} sodium ) -install(DIRECTORY ${relic_SOURCE_DIR}/include/ DESTINATION include/bls-dash) -install(DIRECTORY ${relic_BINARY_DIR}/include/ DESTINATION include/bls-dash) install(FILES ${HEADERS} DESTINATION include/bls-dash) install(FILES $<TARGET_FILE:bls-dash> DESTINATION lib) -- 2.37.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor