[Mesa-dev] [PATCH mesa] meson: hide warnings from external project `gtest`
Emil Velikov
emil.l.velikov at gmail.com
Tue Nov 6 14:32:53 UTC 2018
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.
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.
Two ideas come to mind:
- carry the Wundef fixes for gtest locally in Mesa
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 ;-)
HTH
Emil
[1] https://github.com/evelikov/googletest/commits/wundef-fixes-v2
More information about the mesa-dev
mailing list