[CMake] CMake 2.6.0 RC8: Regression in Visual Studio .NET 2003 generator regarding /EHa vs. /EHsc

Gerhard Grimm ggrimm at detec.de
Tue Apr 15 10:08:50 EDT 2008


Hi there,

when using the compile flag "/EHa" instead of "/EHsc" to enable structured
exception handling along with C++ exception handling, the Visual Studio .NET
generator in 2.6.0 RC8 writes these XML tags to the project file:

<Tool
	Name="VCCLCompilerTool"
	AdditionalOptions="/EHa"
	...
	ExceptionHandling="TRUE"
	...
/>

However, the ExceptionHandling="TRUE" attribute corresponds to the /EHsc
compile flag (which I had removed from CMAKE_CXX_FLAGS), triggering warning
D4025 that complains about /EHsc being overridden by /EHa.
The correct tags would be:

<Tool
	Name="VCCLCompilerTool"
	AdditionalOptions="/EHa"
	...
	ExceptionHandling="FALSE"
	...
/>

I reported a similar problem in November 2007 - it was fixed in CMake 2.5-20071119
which I have been using since then. Obviously, that fix has been broken - supposedly
when introducing the Visual Studio 2008 generator.

Best Regards, Gerhard



More information about the CMake mailing list