Files
secp256k1-zkp/cmake/CheckStringOptionValue.cmake
T

10 lines
441 B
CMake
Raw Normal View History

2023-03-08 13:33:16 +00:00
function(check_string_option_value option)
get_property(expected_values CACHE ${option} PROPERTY STRINGS)
if(expected_values)
2023-03-26 20:08:12 +01:00
if(${option} IN_LIST expected_values)
return()
endif()
2023-03-08 13:33:16 +00:00
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()