[Mesa-dev] [PATCH mesa] meson: hide warnings from external project `gtest`
Eric Engestrom
eric.engestrom at intel.com
Tue Nov 6 15:37:35 UTC 2018
On Tuesday, 2018-11-06 14:32:53 +0000, Emil Velikov wrote:
> On Wed, 31 Oct 2018 at 18:47, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>
> > > One that I'd like to eventually enable (and as an error if possible)
> > > is -Wundef to warn when undefined macros are used; in my experience at
> > > $PREVIOUS_JOB this warning very often indicates actual bugs.
> > >
> > It would have caught a bug in Mesa as well. +1 on the idea to Werror=undef
> >
> Thinking about it - this patch won't help us too much.
It did suppress the ton of warnings I had when building libgtest :)
>
> Many of the #if MACRO checks are within the gtest headers.
> Since we include those in the individual tests, the warnings will trigger.
> The newly set cpp_args will be used only when creating the gtest
> static library, not when compiling a binary that depends on it.
`idep_gtest` has `is_system: true`, which should cover that already; can
you try again on you system and confirm if you're still seeing the spam
from everything that uses gtest? My builds are clean from those.
>
> Two ideas come to mind:
> - carry the Wundef fixes for gtest locally in Mesa
That would be a pain if we ever update our copy of gtest :/
> They're dead trivial and we haven't updated gtest in 2 years.
> - upstream my, or equivalent, patches [1]
> if it helps, feel free to drop my authorship from them ;-)
I've followed your attempts at upstreaming your fixes, and they look way
too resistant to change for me to try my hand.
https://github.com/google/googletest/pull/1335
>
> HTH
> Emil
>
> [1] https://github.com/evelikov/googletest/commits/wundef-fixes-v2
More information about the mesa-dev
mailing list