wolfssl
wolfssl copied to clipboard
make "yes;no" cmake options boolean instead of string
Description
Please describe the scope of the fix or feature addition.
Fixes https://github.com/wolfSSL/wolfssl/issues/5438
add_option
in functions.cmake
always produces variables of type string even for boolean options. I fixed it to produce boolean variables for options that only allow "yes;no".
Can one of the admins verify this patch?
Okay to test. Contributor agreement on file. Thank you @oltolm . Changes look great!
Retest this please
Those options that are still "yes" or "no" are not boolean. For example WOLFSSL_AESGCM
is defined like this
add_option("WOLFSSL_AESGCM"
"Enable wolfSSL AES-GCM support (default: enabled)"
"yes" "yes;no;table;small;word32;4bit")
As you can see it's not a boolean option.
Those options that are still "yes" or "no" are not boolean. For example
WOLFSSL_AESGCM
is defined like thisadd_option("WOLFSSL_AESGCM" "Enable wolfSSL AES-GCM support (default: enabled)" "yes" "yes;no;table;small;word32;4bit")
As you can see it's not a boolean option.
That makes sense. I like the change. Does this change to use boolean fix an issue or is it more to improve your experience when building with CMake?
Those options that are still "yes" or "no" are not boolean. For example
WOLFSSL_AESGCM
is defined like thisadd_option("WOLFSSL_AESGCM" "Enable wolfSSL AES-GCM support (default: enabled)" "yes" "yes;no;table;small;word32;4bit")
As you can see it's not a boolean option.
That makes sense. I like the change. Does this change to use boolean fix an issue or is it more to improve your experience when building with CMake?
I remember having some kind of problem, but I couldn't reproduce it. It's just a general improvement. The CMake GUI now shows a checkbox instead of a dropdown for boolean options.