Skip to content

Commit

Permalink
change compilation flags
Browse files Browse the repository at this point in the history
  • Loading branch information
fpelliccioni committed Apr 6, 2019
1 parent 1f6d55b commit 469bfb1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ option(ENABLE_OPENSSL_TESTS "Enable OpenSSL tests, if OpenSSL is available" OFF)

option(ENABLE_EXPERIMENTAL "Alloc experimental configure options" OFF)
option(ENABLE_ENDOMORPHISM "Enable endomorphism" OFF)
option(ENABLE_ECMULT_STATIC_PRECOMPUTATION "Enable precomputed ecmult table for signing" OFF)
option(ENABLE_ECMULT_STATIC_PRECOMPUTATION "Enable precomputed ecmult table for signing" ON)
option(ENABLE_MODULE_ECDH "Enable ECDH shared secret computation (experimental)." OFF)
option(ENABLE_MODULE_SCHNORR "Enable Schnorr signature module (experimental)." OFF)
option(ENABLE_MODULE_SCHNORR "Enable Schnorr signature module (experimental)." ON)
option(ENABLE_MODULE_RECOVERY "Enable ECDSA pubkey recovery module." ON)
option(ENABLE_MODULE_MULTISET "Enable multiset operations (experimental)." ON)


# message(${ENABLE_TESTS})
# option(WITH_BIGNUM "")
Expand Down Expand Up @@ -337,6 +339,12 @@ if (ENABLE_BENCHMARK)
target_link_libraries(bench_recover secp256k1)
set_target_properties(bench_recover PROPERTIES FOLDER "secp256k1")
endif()
if (ENABLE_MODULE_MULTISET)
add_executable(bench_multiset src/bench_multiset.c)
target_link_libraries(bench_multiset secp256k1)
set_target_properties(bench_multiset PROPERTIES FOLDER "secp256k1")
endif()
endif()
# Tests
Expand Down
7 changes: 5 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Secp256k1Conan(BitprimConanFile):
"enable_module_ecdh": [True, False],
"enable_module_schnorr": [True, False],
"enable_module_recovery": [True, False],
"enable_module_multiset": [True, False],
"with_benchmark": [True, False],
"with_tests": [True, False],
"with_openssl_tests": [True, False],
Expand All @@ -69,10 +70,11 @@ class Secp256k1Conan(BitprimConanFile):
"fPIC=True", \
"enable_experimental=False", \
"enable_endomorphism=False", \
"enable_ecmult_static_precomputation=False", \
"enable_ecmult_static_precomputation=True", \
"enable_module_ecdh=False", \
"enable_module_schnorr=False", \
"enable_module_schnorr=True", \
"enable_module_recovery=True", \
"enable_module_multiset=True", \
"with_benchmark=False", \
"with_tests=False", \
"with_openssl_tests=False", \
Expand Down Expand Up @@ -169,6 +171,7 @@ def build(self):
cmake.definitions["ENABLE_MODULE_ECDH"] = option_on_off(self.options.enable_module_ecdh)
cmake.definitions["ENABLE_MODULE_SCHNORR"] = option_on_off(self.options.enable_module_schnorr)
cmake.definitions["ENABLE_MODULE_RECOVERY"] = option_on_off(self.options.enable_module_recovery)
cmake.definitions["ENABLE_MODULE_MULTISET"] = option_on_off(self.options.enable_module_multiset)

# if self.settings.os == "Windows":
# cmake.definitions["WITH_BIGNUM"] = "mpir"
Expand Down

0 comments on commit 469bfb1

Please sign in to comment.