Switched to clang and C23

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2024-10-13 00:07:49 +03:00
parent 7ea2195fcb
commit 3e3967c1ce
5 changed files with 21 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
project('evol-headers', 'c',
default_options : [ 'c_std=gnu17' ])
default_options : [ 'c_std=gnu23' ])
headers_include = include_directories('.')
@@ -16,6 +16,8 @@ endif
cc = meson.get_compiler('c')
if cc.get_id() == 'msvc'
evh_c_args += '/Zc:preprocessor'
elif cc.get_id() == 'clang'
evh_c_args += '-DEV_CC_CLANG=1'
endif
# All other targets should follow the same template
@@ -33,7 +35,7 @@ headers_dep = declare_dependency(
)
# Tests
str_test = executable('str_test', 'str_test.c', dependencies: [str_dep])
str_test = executable('str_test', 'str_test.c', dependencies: [str_dep], c_args: evh_c_args)
test('evstr', str_test)
if meson.version().version_compare('>= 0.54.0')