automake
[Top][All Lists]
Advanced

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

Re: Turn off C compiler warnings in automake


From: Alex Vong
Subject: Re: Turn off C compiler warnings in automake
Date: Mon, 29 Jun 2015 23:31:06 +0800

於 一,2015-06-29 於 10:00 +0200,Thomas Jahns 提到:
> Hi Alex,
> 
> On 06/28/15 16:21, Alex Vong wrote:
> > Besides, the code base is quite old and as we know compilers always
> > add new warnings. I have asked upstream about fixing the warnings, but
> > it seems there is no easy way to fix all of them. So I want to know is
> > there a portable way to silent all compiler warnings? Since there are
> > lots of warnings even without '-Wall -Wextra'. I want to know how do
> > you think about it.
> 
> since you are using gcc, there are -fsyntax-only and -w which should provide 
> less verbose builds. But there are only very few portable compiler options 
> (like 
> -I, -D) and to my knowledge none address warnings.
> 
> You could of course redirect all compiler stderr output to /dev/null and thus 
> get rid of it, i.e. add 2>/dev/null to your make calls. But this will make 
> debugging build failures harder later on.
> 
> Regards, Thomas
> 
> 
Hi Thomas,

Thanks for telling me there is no portable flag for doing so.
I am now using AC_SUBST() to set the value of STREAM and append `
$(STREAM)>/dev/null' to every make command. If the user configure with
--enable-verbose-compiler, then STREAM will be set to 0, otherwise
STREAM will be set to 2. This keeps the flexibility. Does it sound
reasonable?

Cheers,
Alex





reply via email to

[Prev in Thread] Current Thread [Next in Thread]