[cmake-developers] Enabling more compiler warnings

Brad King brad.king at kitware.com
Wed Nov 7 09:05:36 EST 2012


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.

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.

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.

-Brad



More information about the cmake-developers mailing list