Skip to content

Commit 4d9645b

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

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeLists.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,9 @@ include(CheckStringOptionValue)
9898
check_string_option_value(SECP256K1_ECMULT_WINDOW_SIZE)
9999
add_compile_definitions(ECMULT_WINDOW_SIZE=${SECP256K1_ECMULT_WINDOW_SIZE})
100100

101-
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]")
102-
set_property(CACHE SECP256K1_ECMULT_GEN_KB PROPERTY STRINGS "AUTO" 2 22 86)
101+
set(SECP256K1_ECMULT_GEN_KB 22 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. The default value is a reasonable setting for desktop machines (currently 22). [default=22]")
102+
set_property(CACHE SECP256K1_ECMULT_GEN_KB PROPERTY STRINGS 2 22 86)
103103
check_string_option_value(SECP256K1_ECMULT_GEN_KB)
104-
if(SECP256K1_ECMULT_GEN_KB STREQUAL "AUTO")
105-
set(SECP256K1_ECMULT_GEN_KB 22)
106-
endif()
107104
if(SECP256K1_ECMULT_GEN_KB EQUAL 2)
108105
add_compile_definitions(COMB_BLOCKS=2)
109106
add_compile_definitions(COMB_TEETH=5)

0 commit comments

Comments
 (0)