meson.build 662 B

12345678910111213141516171819202122232425262728
  1. project('options', 'c')
  2. if get_option('testoption') != 'optval'
  3. error('Incorrect value to test option')
  4. endif
  5. if get_option('other_one') != false
  6. error('Incorrect value to boolean option.')
  7. endif
  8. if get_option('combo_opt') != 'combo'
  9. error('Incorrect value to combo option.')
  10. endif
  11. if get_option('array_opt') != ['one', 'two']
  12. message(get_option('array_opt'))
  13. error('Incorrect value for array option')
  14. endif
  15. # If the default changes, update test cases/unit/13 reconfigure
  16. if get_option('b_lto') != false
  17. error('Incorrect value in base option.')
  18. endif
  19. if get_option('includedir') != 'include'
  20. error('Incorrect value in builtin option.')
  21. endif