[vlc-commits] [Git][videolan/vlc][master] meson: check compiler options separately for C/C++

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 29 18:11:03 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
30fc5564 by Steve Lhomme at 2024-11-29T16:01:09+00:00
meson: check compiler options separately for C/C++

Some options may be available to one but not the other.

They are tested separately in autotools.

- - - - -


1 changed file:

- meson.build


Changes:

=====================================
meson.build
=====================================
@@ -491,9 +491,6 @@ add_project_arguments(cc.get_supported_arguments([
     '-Wformat-security',
     '-Wduplicated-branches',
     '-Wduplicated-cond',
-]), language: ['c', 'cpp'])
-
-add_project_arguments(cc.get_supported_arguments([
     '-Wbad-function-cast',
     '-Wwrite-strings',
     '-Wmissing-prototypes',
@@ -505,19 +502,34 @@ add_project_arguments(cc.get_supported_arguments([
     '-pipe'
 ]), language: ['c'])
 
+add_project_arguments(cpp.get_supported_arguments([
+    '-Wextra',
+    '-Wsign-compare',
+    '-Wundef',
+    '-Wpointer-arith',
+    '-Wvolatile-register-var',
+    '-Wformat',
+    '-Wformat-security',
+    '-Wduplicated-branches',
+    '-Wduplicated-cond',
+]), language: ['cpp'])
+
 if get_option('extra_checks')
     add_project_arguments(cc.get_supported_arguments([
         '-Werror=missing-field-initializers',
         '-Werror=format',
-        '-Werror=return-mismatch'
-    ]), language: ['c', 'cpp'])
-    add_project_arguments(cc.get_supported_arguments([
+        '-Werror=return-mismatch',
         '-Werror=incompatible-pointer-types',
         '-Werror=restrict',
         '-Werror=int-conversion',
         '-Werror=implicit-int',
         '-Werror=declaration-missing-parameter-type'
     ]), language: ['c'])
+    add_project_arguments(cpp.get_supported_arguments([
+        '-Werror=missing-field-initializers',
+        '-Werror=format',
+        '-Werror=return-mismatch'
+    ]), language: ['cpp'])
 endif
 
 if get_option('branch_protection') \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/30fc5564e66dd9afa0092c3299542fed2e3a1678

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/30fc5564e66dd9afa0092c3299542fed2e3a1678
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list