File: CheckStringOptionValue.cmake

package info (click to toggle)
libsecp256k1 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,368 kB
  • sloc: ansic: 44,731; python: 772; asm: 736; makefile: 282; sh: 227
file content (10 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
function(check_string_option_value option)
  get_property(expected_values CACHE ${option} PROPERTY STRINGS)
  if(expected_values)
    if(${option} IN_LIST expected_values)
      return()
    endif()
    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()