Skip to content

Commit a06805e

Browse files
committed
cmake: Remove "AUTO" value of SECP256K1_ECMULT_WINDOW_SIZE option
"AUTO" implies that a value is being chosen based on build system introspection or host system capabilities. However, for the `SECP256K1_ECMULT_WINDOW_SIZE` option, the value "AUTO" is hardcoded, which might lead to confusion. This change replaces "AUTO" with a more appropriate default value.
1 parent 26b94ee commit a06805e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,10 @@ if(SECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS)
9292
add_compile_definitions(USE_EXTERNAL_DEFAULT_CALLBACKS=1)
9393
endif()
9494

95-
set(SECP256K1_ECMULT_WINDOW_SIZE "AUTO" CACHE STRING "Window size for ecmult precomputation for verification, specified as integer in range [2..24]. \"AUTO\" is a reasonable setting for desktop machines (currently 15). [default=AUTO]")
96-
set_property(CACHE SECP256K1_ECMULT_WINDOW_SIZE PROPERTY STRINGS "AUTO" 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
95+
set(SECP256K1_ECMULT_WINDOW_SIZE 15 CACHE STRING "Window size for ecmult precomputation for verification, specified as integer in range [2..24]. The default value is a reasonable setting for desktop machines (currently 15). [default=15]")
96+
set_property(CACHE SECP256K1_ECMULT_WINDOW_SIZE PROPERTY STRINGS 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
9797
include(CheckStringOptionValue)
9898
check_string_option_value(SECP256K1_ECMULT_WINDOW_SIZE)
99-
if(SECP256K1_ECMULT_WINDOW_SIZE STREQUAL "AUTO")
100-
set(SECP256K1_ECMULT_WINDOW_SIZE 15)
101-
endif()
10299
add_compile_definitions(ECMULT_WINDOW_SIZE=${SECP256K1_ECMULT_WINDOW_SIZE})
103100

104101
set(SECP256K1_ECMULT_GEN_KB "AUTO" CACHE STRING "The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms). Larger values result in possibly better signing or key generation performance at the cost of a larger table. Valid choices are 2, 22, 86. \"AUTO\" is a reasonable setting for desktop machines (currently 22). [default=AUTO]")

0 commit comments

Comments
 (0)