fix VS 2010 project file generation for release mode

VS 2010 doesn't denote "no debug info" as "None" but as empty tag.
This fixes a regression introduced by
7c3efdfb6ad72955543128a5a13e3f45ef3ee7af.

[ChangeLog][qtbase][qmake] fix VS 2010 project file generation

Task-number: QTBUG-35610
Change-Id: I18ae69a842d0b679a781f8d24c026d422da3a857
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
Joerg Bornemann 2014-01-06 09:22:40 +01:00 committed by The Qt Project
parent 3fadd88f30
commit 2a2936b335

View File

@ -910,13 +910,15 @@ static inline QString toString(compileAsManagedOptions option)
return QString();
}
static inline QString toString(debugOption option)
static inline QString toString(debugOption option, DotNET compilerVersion)
{
switch (option) {
case debugUnknown:
case debugLineInfoOnly:
break;
case debugDisabled:
if (compilerVersion <= NET2010)
break;
return "None";
case debugOldStyleInfo:
return "OldStyle";
@ -1401,7 +1403,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat))
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat,
tool.config->CompilerVersion))
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))