meson.build 353 B

1234567891011121314
  1. project('has type', 'c', 'cpp')
  2. compilers = [meson.get_compiler('c'), meson.get_compiler('cpp')]
  3. foreach cc : compilers
  4. if not cc.has_type('time_t', prefix : '#include<time.h>')
  5. error('Did not detect type that exists.')
  6. endif
  7. if cc.has_type('no_time_t', prefix : '#include<time.h>')
  8. error('Not existing type found.')
  9. endif
  10. endforeach