[cmake-developers] Enabling more compiler warnings
Stephen Kelly
steveire at gmail.com
Wed Nov 7 09:40:20 EST 2012
Brad King wrote:
> On 11/06/2012 08:55 AM, Stephen Kelly wrote:
>> + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -ansi
>> -Wcast- align -Wchar-subscripts -Wall -W -Wshadow")
>
> Adding "-ansi" here will require several other fixes as
> revealed by the dashboard last night.
I've removed that one. I'm not sure what it caused specifically. Was it all
of these? http://open.cdash.org/viewBuildError.php?buildid=2650259
>
> Also, your fix commit:
>
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=853c22b2
>
> added use of cmTarget::UNKNOWN_TARGET which does not exist.
> It is UNKNOWN_LIBRARY.
Thanks, fixed now hopefully.
>
> Finally, existing dashboard scripts already add many of these
> flags. Now we're duplicating them. They should be added in
> a loop that adds each one only if not already present.
I'll see if I can find a way to do that.
Does the cmake regex system have a way to match word boundaries? I need to
be able to match '-W\b' such that '-Wall' is not matched.
Thanks,
Steve.
More information about the cmake-developers
mailing list