From 52469901fcc4bb78817e7eeed50fbf9cd3b751a8 Mon Sep 17 00:00:00 2001 From: Martin Blanchard Date: Mon, 20 Aug 2018 20:32:10 +0100 Subject: Make meson build scripts subprojects friendly Multiple meson build scripts improvements including: * Bump meson requirement to 0.40.1 (0.40 already required) * Declare a dependency object for main library * Stop using add_global_arguments() * Various minor style fixes --- meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 0f9ef18..b6d246c 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libfuse3', 'c', version: '3.2.5', - meson_version: '>= 0.38', + meson_version: '>= 0.40.1', default_options: [ 'buildtype=debugoptimized' ]) @@ -63,9 +63,9 @@ configure_file(output: 'config.h', # # Compiler configuration # -add_global_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-Wall', '-Wextra', '-Wno-sign-compare', - '-Wstrict-prototypes', '-Wmissing-declarations', '-Wwrite-strings', - '-fno-strict-aliasing', language: 'c') +add_project_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-Wall', '-Wextra', '-Wno-sign-compare', + '-Wstrict-prototypes', '-Wmissing-declarations', '-Wwrite-strings', + '-fno-strict-aliasing', language: 'c') # Some (stupid) GCC versions warn about unused return values even when they are # casted to void. This makes -Wunused-result pretty useless, since there is no @@ -80,7 +80,7 @@ int main(void) { }''' if not cc.compiles(code, args: [ '-O0', '-Werror=unused-result' ]) message('Compiler warns about unused result even when casting to void') - add_global_arguments('-Wno-unused-result', language: 'c') + add_project_arguments('-Wno-unused-result', language: 'c') endif # '.' will refer to current build directory, which contains config.h -- cgit v1.2.3