[CMake] VS.NEt generator flag missing

Brad King brad.king at kitware.com
Tue Jan 31 14:26:01 EST 2006


Jorgen Bodde wrote:
> Well should it be enabled by default? Because I am doing nothing else 
> but generating my project (I am not changing GUI settings) so by default 
> it is not included right ?
> 
> My question wasn't whewre it went, it seems to be missing from the 
> generated project as VS.NET complains about it not being present.

It should be there by default.  Look in 
Modules/Platform/Windows-cl.cmake.  It adds /EHsc for VS 8 and /GX for 
other VS versions.  Both of these are mapped to the ExceptionHandling 
GUI option.  In the VS project file generator the option is initalized:

   flagMap["ExceptionHandling"] = "FALSE";

See here for why:

   http://www.cmake.org/Bug/bug.php?op=show&bugid=1324

It should then later be overwritten with "TRUE" when either the /EHsc or 
/GX flag is encountered in CMAKE_CXX_FLAGS.  Make sure your cache has 
one of these options in CMAKE_CXX_FLAGS.

-Brad


More information about the CMake mailing list