Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: pozzugno on October 20, 2011, 11:42:41 am
-
Dear forum,
I'm using a compiler that doesn't allow me to disable specific warning messages through command line options. Now I'm interested to increase the level of warning messages output from compiler, but many messages aren't useful to me and I'd like to remove them.
Can C::B remove automatically the lines from compiler output that contain specific word (like W10298) at a project level (in the Project->Build Options window)? I tried but without success. Alternatively, is it possible at global level (in Settings->Compiler and debugger window)?
Another alternative could be the use of "grep -v" command. How can I pipe the compiler output to grep at a project level or global level?
-
If you use a recent version of C::B (if I remember correctly after 10.05 release, aka nightly build), you can add words to ignore to "Settings -> Compiler and debugger -> Global compiler settings -> Other settings -> Compiler output to be ignored".
As far as I know, it's global for all compilers.
-
If you use a recent version of C::B (if I remember correctly after 10.05 release, aka nightly build), you can add words to ignore to "Settings -> Compiler and debugger -> Global compiler settings -> Other settings -> Compiler output to be ignored".
As far as I know, it's global for all compilers.
I found this option in 10.05 release and you were right, this option is global for all compilers... too bad :(
-
I found this option in 10.05 release and you were right, this option is global for all compilers... too bad :(
So what? I guess not many compilers issue a "W10298" warning. So the question is, whether you can apply a filter that is active for your compiler, only.
-
So what? I guess not many compilers issue a "W10298" warning.
I'm sorry, in my original post there was just an example. I'm interested to disable many warning messages like the following:
W1049C
W1107C
W1264C
and so on. I don't know if they are common warning codes that other compilers may use.
So the question is, whether you can apply a filter that is active for your compiler, only.
Yes, it could be a better solution: specify a filter for a specific compiler and not for all (I think remove the same message for all compiler isn't often useful). But it seems the option "Compiler output to be ignored" is a "Compiler-indipendent option".
-
You ask for how to pipe the result of the compiler into the grep...
I never used it, but, maybe in:
settings -> compiler -> other settings -> advanced options -> [warning] -> command ?
But it will also affect all your compiler and projects...
I thought also about about another possibility I have never used, the scripting:
project properties -> build scripts
But I really don't know what they can do...