1
0
Fork 0
mirror of https://github.com/eosswedenorg/libantelope synced 2026-06-19 04:50:03 +02:00
libantelope/vendor/secp256k1/repo/cmake/CheckStringOptionValue.cmake

12 lines
504 B
CMake

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()