* [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older
@ 2023-05-31 9:39 Thomas Huth
2023-05-31 13:32 ` Marc-André Lureau
2023-05-31 15:34 ` Thomas Huth
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2023-05-31 9:39 UTC (permalink / raw)
To: Paolo Bonzini, Marc-André Lureau, qemu-devel
Cc: Daniel P. Berrangé, Philippe Mathieu-Daudé,
qemu-trivial
There is no need to disable this useful compiler warning for
newer versions of the SDL anymore.
This also enables the printing of the version number with
newer versions of the SDL in the summary of the meson output
again.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index bc76ea96bf..8ccd928dca 100644
--- a/meson.build
+++ b/meson.build
@@ -1273,10 +1273,12 @@ if not get_option('sdl').auto() or have_system
sdl_image = not_found
endif
if sdl.found()
- # work around 2.0.8 bug
- sdl = declare_dependency(compile_args: '-Wno-undef',
- dependencies: sdl,
- version: sdl.version())
+ if sdl.version().version_compare('<=2.0.8')
+ # work around 2.0.8 bug
+ sdl = declare_dependency(compile_args: '-Wno-undef',
+ dependencies: sdl,
+ version: sdl.version())
+ endif
sdl_image = dependency('SDL2_image', required: get_option('sdl_image'),
method: 'pkg-config')
else
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older
2023-05-31 9:39 [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older Thomas Huth
@ 2023-05-31 13:32 ` Marc-André Lureau
2023-05-31 15:34 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2023-05-31 13:32 UTC (permalink / raw)
To: Thomas Huth
Cc: Paolo Bonzini, qemu-devel, Daniel P. Berrangé,
Philippe Mathieu-Daudé, qemu-trivial
[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]
On Wed, May 31, 2023 at 1:40 PM Thomas Huth <thuth@redhat.com> wrote:
> There is no need to disable this useful compiler warning for
> newer versions of the SDL anymore.
>
> This also enables the printing of the version number with
> newer versions of the SDL in the summary of the meson output
> again.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> meson.build | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index bc76ea96bf..8ccd928dca 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1273,10 +1273,12 @@ if not get_option('sdl').auto() or have_system
> sdl_image = not_found
> endif
> if sdl.found()
> - # work around 2.0.8 bug
> - sdl = declare_dependency(compile_args: '-Wno-undef',
> - dependencies: sdl,
> - version: sdl.version())
> + if sdl.version().version_compare('<=2.0.8')
> + # work around 2.0.8 bug
> + sdl = declare_dependency(compile_args: '-Wno-undef',
> + dependencies: sdl,
> + version: sdl.version())
> + endif
> sdl_image = dependency('SDL2_image', required: get_option('sdl_image'),
> method: 'pkg-config')
> else
> --
> 2.31.1
>
>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 2352 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older
2023-05-31 9:39 [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older Thomas Huth
2023-05-31 13:32 ` Marc-André Lureau
@ 2023-05-31 15:34 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2023-05-31 15:34 UTC (permalink / raw)
To: Paolo Bonzini, Marc-André Lureau, qemu-devel
Cc: Daniel P. Berrangé, Philippe Mathieu-Daudé,
qemu-trivial
On 31/05/2023 11.39, Thomas Huth wrote:
> There is no need to disable this useful compiler warning for
> newer versions of the SDL anymore.
>
> This also enables the printing of the version number with
> newer versions of the SDL in the summary of the meson output
> again.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> meson.build | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index bc76ea96bf..8ccd928dca 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1273,10 +1273,12 @@ if not get_option('sdl').auto() or have_system
> sdl_image = not_found
> endif
> if sdl.found()
> - # work around 2.0.8 bug
> - sdl = declare_dependency(compile_args: '-Wno-undef',
> - dependencies: sdl,
> - version: sdl.version())
> + if sdl.version().version_compare('<=2.0.8')
> + # work around 2.0.8 bug
> + sdl = declare_dependency(compile_args: '-Wno-undef',
> + dependencies: sdl,
> + version: sdl.version())
> + endif
Drat, never mind, this still fails with the SDL2 from MinGW:
https://gitlab.com/thuth/qemu/-/jobs/4385862312#L3048
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-31 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 9:39 [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older Thomas Huth
2023-05-31 13:32 ` Marc-André Lureau
2023-05-31 15:34 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).