Re: [libvirt PATCH 6/6] meson: don't probe for -Werror if -Dwerror is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 08, 2021 at 11:58:23AM +0100, Daniel P. Berrangé wrote:
> Meson has its own mechanism to turn on -Werror with the -Dwerror option.
> If this is set, then there is no reason for libvirt to check for -Werror
> itself.

s/-Dwerror/--werror/ here and in $SUBJECT

In meson --werror is build-in option so it is not used together with the
-D{name} option.

> We remove the summary line output because it is potentially misleading
> when libvirt hasn't enabled -Werror, but meson has.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  meson.build | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 9fda0c7948..725d0e1cf0 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -207,7 +207,7 @@ cc = meson.get_compiler('c')
>  cc_flags = []
>  
>  git_werror = get_option('git_werror')
> -if git_werror.enabled() or git_werror.auto() and git
> +if (git_werror.enabled() or git_werror.auto()) and git and not get_option('werror')
>    cc_flags += [ '-Werror' ]
>  endif
>  
> @@ -2300,7 +2300,6 @@ else
>    loader_res = ''
>  endif
>  misc_summary = {
> -  'Use -Werror': cc_flags.contains('-Werror'),
>    'Warning Flags': supported_cc_flags,
>    'docs': gen_docs,
>    'tests': build_tests,
> -- 
> 2.30.2
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux