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