aboutsummaryrefslogtreecommitdiffstats
path: root/meson
diff options
context:
space:
mode:
Diffstat (limited to 'meson')
-rw-r--r--meson/meson.build14
1 files changed, 11 insertions, 3 deletions
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