Merge bitcoin-core/secp256k1#1778: doc/bench: Added cmake build options to bench error messages
3b5b03f301doc/bench: Added cmake build options to bench error messages (kevkevinpal) Pull request description: ## Motivation I wanted to try and run the benchmarking scripts and I noticed the recovery benchmark in `bench.c`. I wanted to run but I was using `cmake` and the error message telling me to use `./configure -enable-module-recovery` wasn't sufficient. I figure rather than forcing users to look into the `CMakeLists.txt` file or anywhere else we should add this to the output ## Solution I appended to the message to include the `-DSECP256K1_ENABLE_MODULE_...=ON` in the message. ACKs for top commit: real-or-random: utACK3b5b03f301hebasto: ACK3b5b03f301, I have reviewed the code and it looks OK. Tree-SHA512: 3a6c966b65ab3f0d6dda81e5dd95529087db3f2901f2686af68c16079ec5b323568f3c9acb155d92a6d50b4102faf0844d0d87216df001adbf69cab4ce86dabc
This commit is contained in:
@@ -205,7 +205,7 @@ int main(int argc, char** argv) {
|
||||
#ifndef ENABLE_MODULE_ECDH
|
||||
if (have_flag(argc, argv, "ecdh")) {
|
||||
fprintf(stderr, "./bench: ECDH module not enabled.\n");
|
||||
fprintf(stderr, "Use ./configure --enable-module-ecdh.\n\n");
|
||||
fprintf(stderr, "See README.md for configuration instructions.\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
@@ -213,7 +213,7 @@ int main(int argc, char** argv) {
|
||||
#ifndef ENABLE_MODULE_RECOVERY
|
||||
if (have_flag(argc, argv, "recover") || have_flag(argc, argv, "ecdsa_recover")) {
|
||||
fprintf(stderr, "./bench: Public key recovery module not enabled.\n");
|
||||
fprintf(stderr, "Use ./configure --enable-module-recovery.\n\n");
|
||||
fprintf(stderr, "See README.md for configuration instructions.\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
@@ -221,7 +221,7 @@ int main(int argc, char** argv) {
|
||||
#ifndef ENABLE_MODULE_SCHNORRSIG
|
||||
if (have_flag(argc, argv, "schnorrsig") || have_flag(argc, argv, "schnorrsig_sign") || have_flag(argc, argv, "schnorrsig_verify")) {
|
||||
fprintf(stderr, "./bench: Schnorr signatures module not enabled.\n");
|
||||
fprintf(stderr, "Use ./configure --enable-module-schnorrsig.\n\n");
|
||||
fprintf(stderr, "See README.md for configuration instructions.\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
@@ -231,7 +231,7 @@ int main(int argc, char** argv) {
|
||||
have_flag(argc, argv, "encode") || have_flag(argc, argv, "decode") || have_flag(argc, argv, "ellswift_keygen") ||
|
||||
have_flag(argc, argv, "ellswift_ecdh")) {
|
||||
fprintf(stderr, "./bench: ElligatorSwift module not enabled.\n");
|
||||
fprintf(stderr, "Use ./configure --enable-module-ellswift.\n\n");
|
||||
fprintf(stderr, "See README.md for configuration instructions.\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user