[CMake] Visual Studio Warning Level

Bill Hoffman bill.hoffman at kitware.com
Fri Nov 21 21:39:43 EST 2008


Robert Dailey wrote:
> Hi,
> 
> I've done some googling on how to set warning levels for visual studio 
> projects generated with CMake and I can't say I really enjoy the 
> proposed solutions I've found. Literally this should be a single 
> function call like:
> 
> cmake_warning_level( 4 )
> 
> I expected something simple like above, but instead I found solutions 
> that involved over 10 lines of code and very complex logic. This is 
> really starting to discourage me from using CMake. I won't jump the gun, 
> though, and I'll assume that I just haven't found that magically simple 
> solution yet. Help is greatly appreciated!
> 

CMake does not yet have a feature to flag type of mapping layer like 
that.  It is on the road map for the future.  It could be and is done 
with macros or functions in projects currently.  I am pretty sure the 
boost CMake files have macros that do this.  Anyone have a macro for 
this to post?

-Bill


More information about the CMake mailing list