openexr: Fix check for when to pass -std=c++98
commit 6adfb120 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 #1117 (closed)
Edited by Nirbheek Chauhan