MantisBT - CMake
View Issue Details
0015284CMakeCMakepublic2014-12-04 14:332015-05-04 09:05
Braden McDaniel 
Brad King 
normalminoralways
closedfixed 
CMake 3.0.2 
CMake 3.2CMake 3.2 
0015284: /wd flags in source COMPILE_FLAGS replace /wd flags from other sources in Visual Studio generator
If /wdXXXX flags (i.e., flags to disable specific warnings) are added via the source property COMPILE_FLAGS, these flags replace (rather than complement) any /wdXXXX flags added from other sources (e.g., the CMAKE_CXX_FLAGS variable or the directory COMPILE_FLAGS property).

This is the case, at least, when using the Visual Studio 2013 generator.
No tags attached.
Issue History
2014-12-04 14:33Braden McDanielNew Issue
2014-12-04 15:42Brad KingNote Added: 0037390
2014-12-04 15:43Brad KingAssigned To => Brad King
2014-12-04 15:43Brad KingStatusnew => assigned
2014-12-04 15:43Brad KingTarget Version => CMake 3.2
2014-12-08 08:56Brad KingStatusassigned => resolved
2014-12-08 08:56Brad KingResolutionopen => fixed
2014-12-08 08:56Brad KingFixed in Version => CMake 3.2
2015-05-04 09:05Robert MaynardNote Added: 0038693
2015-05-04 09:05Robert MaynardStatusresolved => closed

Notes
(0037390)
Brad King   
2014-12-04 15:42   
It looks like VS 9 and below combine the flags automatically, but for VS >= 10 we need to add an explicitly reference to get the flags inherited. This should fix it:

 VS: Inherit target-level "-wd" flags in source files
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f545eb0b [^]
(0038693)
Robert Maynard   
2015-05-04 09:05   
Closing resolved issues that have not been updated in more than 4 months.