mirror of https://github.com/qt/qtbase.git
fix parsing of WinRT compiler options
Set defaults before parsing compiler options. UsePrecompiledHeader, CompileAsWinRT and GenerateWindowsMetadata options were overwritten after parsing the options. Task-number: QTBUG-46978 Change-Id: I8c4e423cd13f575fa679b114108b693937908549 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
parent
e3fa2cb660
commit
d4ebbac1b3
|
@ -1037,6 +1037,17 @@ void VcprojGenerator::initConfiguration()
|
|||
conf.suppressUnknownOptionWarnings = project->isActiveConfig("suppress_vcproj_warnings");
|
||||
conf.CompilerVersion = which_dotnet_version(project->first("MSVC_VER").toLatin1());
|
||||
|
||||
if (conf.CompilerVersion >= NET2012) {
|
||||
conf.WinRT = project->isActiveConfig("winrt");
|
||||
if (conf.WinRT) {
|
||||
conf.WinPhone = project->isActiveConfig("winphone");
|
||||
// Saner defaults
|
||||
conf.compiler.UsePrecompiledHeader = pchNone;
|
||||
conf.compiler.CompileAsWinRT = _False;
|
||||
conf.linker.GenerateWindowsMetadata = _False;
|
||||
}
|
||||
}
|
||||
|
||||
initCompilerTool();
|
||||
|
||||
// Only on configuration per build
|
||||
|
@ -1083,17 +1094,6 @@ void VcprojGenerator::initConfiguration()
|
|||
conf.PrimaryOutputExtension = '.' + targetSuffix;
|
||||
}
|
||||
|
||||
if (conf.CompilerVersion >= NET2012) {
|
||||
conf.WinRT = project->isActiveConfig("winrt");
|
||||
if (conf.WinRT) {
|
||||
conf.WinPhone = project->isActiveConfig("winphone");
|
||||
// Saner defaults
|
||||
conf.compiler.UsePrecompiledHeader = pchNone;
|
||||
conf.compiler.CompileAsWinRT = _False;
|
||||
conf.linker.GenerateWindowsMetadata = _False;
|
||||
}
|
||||
}
|
||||
|
||||
conf.Name = project->values("BUILD_NAME").join(' ');
|
||||
if (conf.Name.isEmpty())
|
||||
conf.Name = isDebug ? "Debug" : "Release";
|
||||
|
|
Loading…
Reference in New Issue