diff options
author | Pieter Wuille <pieter@wuille.net> | 2023-03-08 17:41:24 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2023-03-08 17:41:24 -0500 |
commit | e5c7fcb361d3379c254a52104b4ba25907cd07bb (patch) | |
tree | 37e8e274f70f03efae813330d9e31c40a129d81b /src/secp256k1/cmake/CheckStringOptionValue.cmake | |
parent | 710fd571ff4c3133e41d7f62922cb4cc816250d3 (diff) | |
parent | 763079a3f1b937f54e3c2d4166d296f596f7be1b (diff) | |
download | bitcoin-e5c7fcb361d3379c254a52104b4ba25907cd07bb.tar.xz |
Update src/secp256k1 subtree to upstream libsecp256k1 v0.3.0
Diffstat (limited to 'src/secp256k1/cmake/CheckStringOptionValue.cmake')
-rw-r--r-- | src/secp256k1/cmake/CheckStringOptionValue.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/secp256k1/cmake/CheckStringOptionValue.cmake b/src/secp256k1/cmake/CheckStringOptionValue.cmake new file mode 100644 index 0000000000..bc4d7b5749 --- /dev/null +++ b/src/secp256k1/cmake/CheckStringOptionValue.cmake @@ -0,0 +1,12 @@ +function(check_string_option_value option) + get_property(expected_values CACHE ${option} PROPERTY STRINGS) + if(expected_values) + foreach(value IN LISTS expected_values) + if(value STREQUAL "${${option}}") + return() + endif() + endforeach() + message(FATAL_ERROR "${option} value is \"${${option}}\", but must be one of ${expected_values}.") + endif() + message(AUTHOR_WARNING "The STRINGS property must be set before invoking `check_string_option_value' function.") +endfunction() |