github.com/ethereum/go-ethereum@v1.16.1/crypto/secp256k1/libsecp256k1/cmake/CheckStringOptionValue.cmake (about)

     1  function(check_string_option_value option)
     2    get_property(expected_values CACHE ${option} PROPERTY STRINGS)
     3    if(expected_values)
     4      if(${option} IN_LIST expected_values)
     5        return()
     6      endif()
     7      message(FATAL_ERROR "${option} value is \"${${option}}\", but must be one of ${expected_values}.")
     8    endif()
     9    message(AUTHOR_WARNING "The STRINGS property must be set before invoking `check_string_option_value' function.")
    10  endfunction()