[v3,2/2] build: treat warning as an error on Windows
Checks
Commit Message
Added -Werror in meson file to consider all the warnings
as errors on Windows.
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
config/meson.build | 4 ++++
1 file changed, 4 insertions(+)
Comments
29/05/2020 01:14, Pallavi Kadam:
> Added -Werror in meson file to consider all the warnings
> as errors on Windows.
>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
> --- a/config/meson.build
> +++ b/config/meson.build
> +# add -Werror to treat warnings as errors on Windows
> +if is_windows
> + warning_flags += '-Werror'
> +endif
This should be not needed.
When configuring meson in a CI, we are supposed to use
--werror as it is done in devtools/test-meson-builds.sh.
On 6/11/2020 9:12 AM, Thomas Monjalon wrote:
> 29/05/2020 01:14, Pallavi Kadam:
>> Added -Werror in meson file to consider all the warnings
>> as errors on Windows.
>>
>> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
>> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
>> ---
>> --- a/config/meson.build
>> +++ b/config/meson.build
>> +# add -Werror to treat warnings as errors on Windows
>> +if is_windows
>> + warning_flags += '-Werror'
>> +endif
>
> This should be not needed.
> When configuring meson in a CI, we are supposed to use
> --werror as it is done in devtools/test-meson-builds.sh.
>
>
>
Ok, will fix this in v4.
@@ -208,6 +208,10 @@ warning_flags = [
'-Wno-packed-not-aligned',
'-Wno-missing-field-initializers'
]
+# add -Werror to treat warnings as errors on Windows
+if is_windows
+ warning_flags += '-Werror'
+endif
if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
# FIXME: Bugzilla 396
warning_flags += '-Wno-zero-length-bounds'