openexr: Fix check for when to pass -std=c++98
authorNirbheek Chauhan <nirbheek@centricular.com>
Sun, 1 Dec 2019 11:34:05 +0000 (17:04 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 2 Dec 2019 10:14:52 +0000 (10:14 +0000)
commitd3d4228972565018b1488babafe95af0d71f0a84
tree24d70d2d3d8185d09f03accd535b1342dc31f059
parentd9e6f19026880f1f068aabb50c52b9a4d7b524e5
openexr: Fix check for when to pass -std=c++98

commit 6adfb120ab0e1bb0b3439ad725a362cfe4fbe733 added this flag to fix
builds with `-Werror`, and afterwards it was changed to use a version
check when newer versions of openexr moved over to C++11.

However, some distros have backported patches to older openexr
versions which make it require C++11, which makes the version check
incorrect and causes an error because we passed `-Werror -std=c++98`.

Instead, directly check when usage of the header requires `-std=c++98`
with `-Werror` and override the `cpp_std` setting on the target.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1117
ext/openexr/meson.build