diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-03-10 11:57:59 +0100 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-03-13 08:51:49 +0100 |
commit | 6fec4e9c341af2876a8dce9e2444aaf49f514b6a (patch) | |
tree | b70382bda30b6e02baa0d29cf0f77d1ea3b10771 | |
parent | 658c28bf9cc4a9f1076839e77f65dd9ad799a683 (diff) | |
download | mesa-demos-6fec4e9c341af2876a8dce9e2444aaf49f514b6a.tar.gz |
meson: disable some msvc warnings for c++
The macro definition warning is about APIENTRY, which glad defines in an
incompatible way with windows.h. But this is fixed in glad 2.x, so instead
of tring to fix every single test to undef APIENTRY, let's just disable
the warning until we land the glad 2.x upgrade.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
-rw-r--r-- | meson.build | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meson.build b/meson.build index cbc6e469..3a08381c 100644 --- a/meson.build +++ b/meson.build @@ -172,6 +172,7 @@ elif host_machine.system() == 'openbsd' endif c_args = [] +cpp_args = [] if cc.get_argument_syntax() == 'msvc' c_args += '-D_CRT_SECURE_NO_WARNINGS' c_args += cc.get_supported_arguments([ @@ -179,6 +180,11 @@ if cc.get_argument_syntax() == 'msvc' '/wd4244', # conversion from 'type1' to 'type2', possible loss of data '/wd4305', # truncation from 'type1' to 'type2' '/wd4459', # declaration of 'var' hides global declaration + '/wd4005', # macro redefinition + ]) + cpp_args += cc.get_supported_arguments([ + '/wd4305', # truncation from 'type1' to 'type2' + '/wd4005', # macro redefinition ]) else c_args += cc.get_supported_arguments([ @@ -207,5 +213,6 @@ else endif add_project_arguments(c_args, language: 'c') +add_project_arguments(cpp_args, language: 'cpp') subdir('src') |