-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting MONERO_WALLET_CRYPTO_LIBRARY to cn
?
#6774
Comments
As a workaround you can change the Makefile to include -DMONERO_WALLET_CRYPTO_LIBRARY=cn |
Something like this would do what you want (the top bit, the rest is just cosmetics). diff --git a/src/crypto/wallet/CMakeLists.txt b/src/crypto/wallet/CMakeLists.txt
index 4ed986dce..985dc1180 100644
--- a/src/crypto/wallet/CMakeLists.txt
+++ b/src/crypto/wallet/CMakeLists.txt
@@ -29,7 +29,12 @@
#
# Possibly user defined values.
#
-set(MONERO_WALLET_CRYPTO_LIBRARY "auto" CACHE STRING "Select a wallet crypto library")
+if("$ENV{MONERO_WALLET_CRYPTO_LIBRARY}" STREQUAL "cn")
+ set(MONERO_WALLET_CRYPTO_LIBRARY "cn" CACHE STRING "Internal crypto library for wallet selected by user")
+ message(STATUS "Wallet crypto is using cn crypto backend, internal crypto library for wallet selected by user")
+else()
+ set(MONERO_WALLET_CRYPTO_LIBRARY "auto" CACHE STRING "Select a wallet crypto library")
+endif()
#
# If the user specified "auto", detect best library defaulting to internal.
@@ -37,10 +42,10 @@ set(MONERO_WALLET_CRYPTO_LIBRARY "auto" CACHE STRING "Select a wallet crypto lib
if (${MONERO_WALLET_CRYPTO_LIBRARY} STREQUAL "auto")
monero_crypto_autodetect(AVAILABLE BEST)
if (DEFINED BEST)
- message("Wallet crypto is using ${BEST} backend")
+ message(STATUS "Wallet crypto is using ${BEST} backend")
set(MONERO_WALLET_CRYPTO_LIBRARY ${BEST})
else ()
- message("Defaulting to internal crypto library for wallet")
+ message(STATUS "Defaulting to internal crypto library for wallet")
set(MONERO_WALLET_CRYPTO_LIBRARY "cn")
endif ()
endif ()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c601b93ed..e42ee6a48 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -129,7 +129,7 @@ if (${MONERO_WALLET_CRYPTO_BENCH} STREQUAL "auto")
if (DEFINED AVAILABLE)
list(APPEND MONERO_WALLET_CRYPTO_BENCH ${AVAILABLE})
endif ()
- message("Wallet crypto bench is using ${MONERO_WALLET_CRYPTO_BENCH}")
+ message(STATUS "Wallet crypto bench is using ${MONERO_WALLET_CRYPTO_BENCH}")
endif ()
list(REMOVE_DUPLICATES MONERO_WALLET_CRYPTO_BENCH) |
Thank you it works well. Is there a chance for this patch to be PRed? |
I don't understand why a change to an environment variable is necessary when the other options are done via standard cmake option ? |
There are many ways to do what @moneroexamples requested. Editing the Makefile and adding the cmake define and having to stash/pop every time master is pulled, creating a local branch and having to rebase to master every time master is pulled, etc... I can PR later if you are OK with it. |
I think it would be good to use The issue I have now, and maybe others as well in the future, is that projects that are base of monero are dependent now on the optimized library. For example, the monero explorer does not compile as it requires new libraries. I can make it work by using moneroexamples/onion-monero-blockchain-explorer#215 But for consistency reasons I think it would be good to set it using
|
I would argue that those linker errors are the result of |
By default
MONERO_WALLET_CRYPTO_LIBRARY
isauto
.Is there a way to set it to
cn
when building monero. Something along the lines of setting upUSE_SINGLE_BUILDDIR
:But when I try to execute analoging command for
MONERO_WALLET_CRYPTO_LIBRARY
:the
MONERO_WALLET_CRYPTO_LIBRARY
will beauto
regardless.The text was updated successfully, but these errors were encountered: