Update meson.build

This commit is contained in:
Michael Brockus
2020-08-06 12:39:56 -07:00
committed by GitHub
parent eeecc49ce8
commit 5f8e90b82a

View File

@ -8,46 +8,10 @@ project('cmock', 'c',
license: 'MIT',
meson_version: '>=0.53.0',
subproject_dir : 'vendor',
default_options: ['layout=flat', 'warning_level=3', 'werror=true', 'c_std=c11']
default_options: ['werror=true', 'c_std=c11']
)
lang = 'c'
cc = meson.get_compiler(lang)
#
# Meson: Add compiler flags
#
if cc.get_id() == 'clang'
add_project_arguments(cc.get_supported_arguments(
[
'-Wexit-time-destructors',
'-Wglobal-constructors',
'-Wmissing-prototypes',
'-Wmissing-noreturn',
'-Wno-missing-braces',
'-Wold-style-cast', '-Wpointer-arith', '-Wweak-vtables',
'-Wcast-align', '-Wconversion', '-Wcast-qual', '-Wshadow'
]
), language: lang)
endif
if cc.get_argument_syntax() == 'gcc'
add_project_arguments(cc.get_supported_arguments(
[
'-Wformat', '-Waddress', '-Winit-self', '-Wno-multichar',
'-Wpointer-arith' , '-Wwrite-strings' ,
'-Wno-parentheses' , '-Wno-type-limits' ,
'-Wformat-security' , '-Wunreachable-code' ,
'-Waggregate-return' , '-Wformat-nonliteral' ,
'-Wmissing-declarations', '-Wmissing-include-dirs' ,
'-Wno-unused-parameter'
]
), language: lang)
endif
unity_dep = dependency('unity', fallback: ['unity', 'unity_dep'])
#
# Sub directory to project source code
subdir('src')
cmock_dep = declare_dependency(link_with: cmock_lib, include_directories: cmock_dir)