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
This commit is contained in:
Scott D Phillips 2017-05-08 11:01:39 -07:00 committed by Tim-Philipp Müller
parent 1a8610f8f8
commit 0309b20098

View file

@ -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 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 # 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 # NOTE: Only add warnings here if you are sure they're spurious
add_project_arguments( msvc_args = [
'/wd4018', # implicit signed/unsigned conversion '/wd4018', # implicit signed/unsigned conversion
'/wd4146', # unary minus on unsigned (beware INT_MIN) '/wd4146', # unary minus on unsigned (beware INT_MIN)
'/wd4244', # lossy type conversion (e.g. double -> int) '/wd4244', # lossy type conversion (e.g. double -> int)
'/wd4305', # truncating type conversion (e.g. double -> float) '/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 # Disable SAFESEH with MSVC for plugins and libs that use external deps that
# are built with MinGW # are built with MinGW
noseh_link_args = ['/SAFESEH:NO'] noseh_link_args = ['/SAFESEH:NO']