From 7b954f5667e82de1b64984a9aeb26b8ebb5cab81 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 8 Mar 2021 23:25:35 -0500 Subject: WIP: Validation --- meson/meson.build | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'meson') diff --git a/meson/meson.build b/meson/meson.build index 20e0522f..5dd0de38 100644 --- a/meson/meson.build +++ b/meson/meson.build @@ -109,7 +109,7 @@ gcc_c_warnings = [ ] # Set all_c_warnings for the current C compiler -if is_variable('cc') +if is_variable('cc') and not is_variable('all_c_warnings') if cc.get_id() == 'clang' all_c_warnings = ['-Weverything'] elif cc.get_id() == 'gcc' @@ -133,10 +133,13 @@ if is_variable('cc') else all_c_warnings = [] endif + + all_c_warnings = cc.get_supported_arguments(all_c_warnings) + endif # Set all_cpp_warnings for the current C++ compiler -if is_variable('cpp') +if is_variable('cpp') and not is_variable('all_cpp_warnings') if cpp.get_id() == 'clang' all_cpp_warnings = [ '-Weverything', @@ -179,10 +182,13 @@ if is_variable('cpp') else all_cpp_warnings = [] endif + + all_cpp_warnings = cpp.get_supported_arguments(all_cpp_warnings) + endif # Set all_objc_warnings for the current Objective C compiler -if is_variable('objcc') +if is_variable('objcc') and not is_variable('all_objc_warnings') all_objc_warnings = [] if objcc.get_id() == 'clang' all_objc_warnings = ['-Weverything'] @@ -193,4 +199,6 @@ if is_variable('objcc') else all_objc_warnings = [] endif + + all_objc_warnings = objcc.get_supported_arguments(all_objc_warnings) endif -- cgit v1.2.1