diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..026bc0d --- /dev/null +++ b/meson.build @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: CC0-1.0 + +project('vsp-tests', 'c', + meson_version : '>= 0.60', + version : '0.0.0', + default_options : [ + 'werror=true', + 'warning_level=2', + ], + license : 'GPL 2.0+') + +# +# Configure the build environment +# +cc = meson.get_compiler('c') + +cc_arguments = [ + '-Wno-unused-parameter', +] + +if cc.get_id() == 'clang' + # Turn _FORTIFY_SOURCE by default on optimised builds (as it requires -O1 + # or higher). This is needed on clang only as gcc enables it by default. + if get_option('optimization') != '0' + cc_arguments += [ + '-D_FORTIFY_SOURCE=2', + ] + endif +endif + +add_project_arguments(cc_arguments, language : 'c') + +subdir('data') +subdir('scripts') +subdir('src') +subdir('tests') |