[CMake] how can I filter compiler warnings?
Kevin Burge
kevin.burge at systemware.com
Mon May 10 15:14:02 EDT 2010
That's correct.
On 05/10/2010 02:08 PM, Bill Lorensen wrote:
> You can filter warnings with regular expressions for dashboard
> submissions. But, I assume you want to not see them when you build the
> system?
>
> On Mon, May 10, 2010 at 1:15 PM, Kevin Burge<kevin.burge at systemware.com> wrote:
>
>> The trick is I want the compiler to issue the warnings I need to filter for
>> *my* code, but I want them suppressed for the third party libraries we use
>> (particularly their headers). So, what we do is specifically filter the
>> warning for things we didn't write, but fix them in our code. You don't want
>> to disable the warning, because then you will not find those kinds of problems
>> in your own code. If I could make all third-party warnings disappear when
>> compiling my object files, on all platforms, that'd be great, but I don't
>> think such a filter exists, so, we're left shooting them down one by one. If
>> cmake cause make/nmake to pipe the output through some filter, that would
>> allow me to pick and choose what to suppress. I figure the cmake has to be
>> doing this somewhere, since it colorizes the output. I just want to hook into
>> this somehow and clean up some of the lines myself, if that's possible.
>>
>> * Chuck Atkins<chuck.atkins at kitware.com> [2010-05-10 11:55:44 -0500]:
>>
>>
>>> These are really the kind of warnings that you want to disable with a compiler flag but it will be specific for the given compiler. Which platforms do you see the warning on? The error message looks like an xl compiler warning. Do you see it on other platforms as well?
>>>
>>>
>>>
>>> On Mon, May 10, 2010 at 11:06 AM, Kevin Burge<kevin.burge at systemware.com<mailto:kevin.burge at systemware.com>> wrote:
>>> My apologies: Solaris (gcc 412), AIX (xlC 9), Windows (MSVC8 - i.e. Visual Studio 2005 w/ nmake), Linux (several different gcc releases)
>>>
>>>
>>> On 05/10/2010 10:04 AM, Chuck Atkins wrote:
>>> What compiler / platform are you using?
>>>
>>>
>>>
>>> On Mon, May 10, 2010 at 9:53 AM, Kevin Burge<kevin.burge at systemware.com<mailto:kevin.burge at systemware.com>> wrote:
>>> Any ideas on how to do this kind of supression? I'm thinking now I just need to write a cc/c++ "script" that cmake will find first, that actually does the filtering. I never could figure out a way to forcefully indicate the compiler that didn't break things.
>>>
>>>
>>> On 05/07/2010 12:47 PM, Chuck Atkins wrote:
>>> What exactly do you mean by "filter"? Do you want to suppress the warnings?
>>>
>>>
>>> On Fri, May 7, 2010 at 1:29 PM, Kevin Burge<kevin.burge at systemware.com<mailto:kevin.burge at systemware.com>> wrote:
>>> I need to be able to filter warnings out of the compilation output from specific files:
>>>
>>> "/usr/include/pthread.h", line 990.27: 1506-450 (I) Obsolete non-prototype-style function declaration.
>>> "/usr/include/pthread.h", line 1049.42: 1506-450 (I) Obsolete non-prototype-style function declaration.
>>> "/usr/include/pthread.h", line 1050.42: 1506-450 (I) Obsolete non-prototype-style function declaration
>>>
>>> On our old build system, we replaced cc with a ruby script that filtered the output. I never did figure out the way to do this with cmake. I'd rather have cmake filter it if it can.
>>>
>>> Please let me know if there's a way to do this.
>>>
>>> Thank you,
>>> Kevin Burge
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com<http://www.kitware.com>
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>>
>>>
>>>
>> --
>> Kevin Burge
>> Technical Specialist
>> 15301 Dallas Parkway #1100
>> Addison, TX 75001
>> V. (972) 239-2699
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>>
More information about the CMake
mailing list