From 0309b20098fff102b73f6ac0a5d2ff1b220d090a Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Mon, 8 May 2017 11:01:39 -0700 Subject: [PATCH] meson: Ignore msvc warnings in C++ as well We were only ignoring the listed msvc warnings for C language files and not C++. This was working by the coincidence that we did not have any instances of these warnings in C++ files. Lately the build of decklink has been fixed on windows, and it has an instance of one of these warnings in a C++ file. https://bugzilla.gnome.org/show_bug.cgi?id=782345 --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 259fa913d5..f1d8da7be9 100644 --- a/meson.build +++ b/meson.build @@ -34,12 +34,14 @@ if cc.get_id() == 'msvc' # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once # NOTE: Only add warnings here if you are sure they're spurious - add_project_arguments( + msvc_args = [ '/wd4018', # implicit signed/unsigned conversion '/wd4146', # unary minus on unsigned (beware INT_MIN) '/wd4244', # lossy type conversion (e.g. double -> int) '/wd4305', # truncating type conversion (e.g. double -> float) - language : 'c') + ] + add_project_arguments(msvc_args, language : 'c') + add_project_arguments(msvc_args, language : 'cpp') # Disable SAFESEH with MSVC for plugins and libs that use external deps that # are built with MinGW noseh_link_args = ['/SAFESEH:NO']