diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-02-24 16:00:21 +0100 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-02-27 08:55:05 +0000 |
commit | 000d0bf15e847ee0225d5b281297b196d3a035be (patch) | |
tree | 1d9cc94d41672b7799c471b9cd8c55f59926c13c | |
parent | a3c640939dc5b55156ce24c3f0e9f8518e0a18d2 (diff) | |
download | mesa-demos-000d0bf15e847ee0225d5b281297b196d3a035be.tar.gz |
meson: disable some warnings on macos
On macOS, there's a difference between GLhandleARB and GLuint, which
means that the prototypes between GL_ARB_vertex_shader and the core
version of these APIs aren't strictly speaking compatible.
This isn't a real problem in reality, because nobody ends up with more
than 2^32-1 handles. But it makes the compiler complain.
So let's silence these warnings on macOS. It's going to be fine.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
-rw-r--r-- | meson.build | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 9299004b..c7a6ade3 100644 --- a/meson.build +++ b/meson.build @@ -168,8 +168,6 @@ else '-Werror=missing-prototypes', '-Werror=return-type', '-Werror=empty-body', - '-Werror=incompatible-pointer-types', - '-Werror=int-conversion', '-Wimplicit-fallthrough=3', '-Wmisleading-indentation', '-Wno-missing-field-initializers', @@ -181,6 +179,13 @@ else '-Wno-microsoft-enum-value', '-Wno-unused-function', ]) + + if host_machine.system() != 'darwin' + c_args += cc.get_supported_arguments([ + '-Werror=incompatible-pointer-types', + '-Werror=int-conversion', + ]) + endif endif add_project_arguments(c_args, language: 'c') |