blob: 06edd7bf7158f1b03ef3c8c99918e8f3929cc74c [file] [log] [blame]
project('test default options', 'c',
default_options: {
'bool': true,
'int': 42,
'str': 'foo',
'array': ['foo'],
'werror': true,
},
)
assert(get_option('bool') == true)
assert(get_option('int') == 42)
assert(get_option('str') == 'foo')
assert(get_option('array') == ['foo'])
assert(get_option('werror') == true)
cc = meson.get_compiler('c')
# MSVC does not support #warning
if cc.get_id() != 'msvc'
static_library('foo', 'lib.c', override_options: {'werror': false})
endif