summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-06-15 12:44:17 (GMT)
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2010-06-16 11:42:03 (GMT)
commit73fa311f67b21c9b897de0196d3b8227f27d828f (patch)
tree1c0c6f0a76e543b2a631a6fd91cabfc56b35f2cc /qmake
parent5b5785bc564ccea9f6868d02be3d1080cb5039b9 (diff)
downloadQt-73fa311f67b21c9b897de0196d3b8227f27d828f.zip
Qt-73fa311f67b21c9b897de0196d3b8227f27d828f.tar.gz
Qt-73fa311f67b21c9b897de0196d3b8227f27d828f.tar.bz2
qmake: Fix CONFIG += exceptions_off with the MSVC project generator.
cl.exe default exception handling (when not specified on the command line) is to disable exceptions. In vcproj files however, if the ExceptionHandling option is not specified, the default behavior is to enable exceptions without SEH (/EHsh). This patch makes sure that ExceptionHandling is disabled when /EHsc is not fed to parseOption (which happens when the exceptions_off config is encountered). For VS2003 the values are a bit different where "false"==ehNone, "true"==ehNoSEH and ehSEH is not available. The default is "true" if not specified thus why we set it to "false" when exceptions_off is given. Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp1
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp7
2 files changed, 6 insertions, 2 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 75fc910..bf874b2 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -385,6 +385,7 @@ VCXCLCompilerTool::VCXCLCompilerTool()
DisableLanguageExtensions(unset),
EnableFiberSafeOptimizations(unset),
EnablePREfast(unset),
+ ExceptionHandling("false"),
ExpandAttributedSource(unset),
FloatingPointExceptions(unset),
ForceConformanceInForLoopScope(unset),
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 1e060a0..e23e119 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -360,8 +360,11 @@ inline XmlOutput::xml_output xformUsePrecompiledHeaderForNET2005(pchOption whatP
inline XmlOutput::xml_output xformExceptionHandlingNET2005(exceptionHandling eh, DotNET compilerVersion)
{
- if (eh == ehDefault)
- return noxml();
+ if (eh == ehDefault) {
+ if (compilerVersion >= NET2005)
+ return attrE(_ExceptionHandling, ehNone);
+ return attrS(_ExceptionHandling, "false");
+ }
if (compilerVersion >= NET2005)
return attrE(_ExceptionHandling, eh);