qmake: fix default value for C++ optimization in vcxproj files

For the debug configuration the optimization should be turned off.

Task-number: QTBUG-23421

Change-Id: Ib63e0c51f9ab31180ff8ee01a1f6c57ab77e390e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Joerg Bornemann 2012-01-06 16:40:27 +01:00 committed by Qt by Nokia
parent c85121989f
commit ece75a8adf
2 changed files with 8 additions and 2 deletions

View File

@ -925,15 +925,17 @@ static inline QString toString(inlineExpansionOption option)
static inline QString toString(optimizeOption option)
{
switch (option) {
case optimizeDisabled:
case optimizeFull:
case optimizeCustom:
case optimizeDefault:
break;
case optimizeDisabled:
return "Disabled";
case optimizeMinSpace:
return "MinSpace";
case optimizeMaxSpeed:
return "MaxSpeed";
case optimizeFull:
return "Full";
}
return QString();
}

View File

@ -949,6 +949,10 @@ void VcprojGenerator::initCompilerTool()
placement = ".\\";
VCConfiguration &conf = vcProject.Configuration;
if (conf.CompilerVersion >= NET2010) {
// adjust compiler tool defaults for VS 2010 and above
conf.compiler.Optimization = optimizeDisabled;
}
conf.compiler.AssemblerListingLocation = placement ;
conf.compiler.ProgramDataBaseFileName = ".\\" ;
conf.compiler.ObjectFile = placement ;