fix PlatformToolSet tag location in vcxproj files
The PlatformToolSet tag belongs into the PropertyGroup with the label "Configuration". The former location in an anonymous PropertyGroup tricked Visual Studio into displaying the right PlatformToolSet but using its default value. If VS 2010 and VS 2012 are freshly installed on the same machine, the default toolset for VS 2012 is VS 2010. Task-number: QTBUG-30822 Change-Id: If00a532e92b0812c552b1cac52ff77a1e7039146 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
aa1b4c0943
commit
853a0b764e
@ -182,6 +182,7 @@ const char _Optimization[] = "Optimization";
|
||||
const char _OptimizeReferences[] = "OptimizeReferences";
|
||||
const char _OutputDirectory[] = "OutputDirectory";
|
||||
const char _OutputFile[] = "OutputFile";
|
||||
const char _PlatformToolSet[] = "PlatformToolSet";
|
||||
const char _PrecompiledHeader[] = "PrecompiledHeader";
|
||||
const char _PrecompiledHeaderFile[] = "PrecompiledHeaderFile";
|
||||
const char _PrecompiledHeaderOutputFile[] = "PrecompiledHeaderOutputFile";
|
||||
@ -467,10 +468,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool)
|
||||
<< attrTag("Condition", condition)
|
||||
<< valueTag(tool.Configuration.IntermediateDirectory);
|
||||
}
|
||||
if (tool.Configuration.CompilerVersion >= NET2012) {
|
||||
xml << tagValue("PlatformToolSet",
|
||||
platformToolSetVersion(tool.Configuration.CompilerVersion));
|
||||
}
|
||||
if ( !tool.Configuration.PrimaryOutput.isEmpty() ) {
|
||||
xml<< tag("TargetName")
|
||||
<< attrTag("Condition", condition)
|
||||
@ -668,10 +665,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
|
||||
<< attrTag("Condition", condition)
|
||||
<< valueTag(config.IntermediateDirectory);
|
||||
}
|
||||
if (config.CompilerVersion >= NET2012) {
|
||||
xml << tagValue("PlatformToolSet",
|
||||
platformToolSetVersion(config.CompilerVersion));
|
||||
}
|
||||
if (!config.PrimaryOutput.isEmpty()) {
|
||||
xml << tag("TargetName")
|
||||
<< attrTag("Condition", condition)
|
||||
@ -1649,6 +1642,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCConfiguration &tool)
|
||||
xml << tag("PropertyGroup")
|
||||
<< attrTag("Condition", generateCondition(tool))
|
||||
<< attrTag("Label", "Configuration")
|
||||
<< attrTagS(_PlatformToolSet, platformToolSetVersion(tool.CompilerVersion))
|
||||
<< attrTagS(_OutputDirectory, tool.OutputDirectory)
|
||||
<< attrTagT(_ATLMinimizesCRunTimeLibraryUsage, tool.ATLMinimizesCRunTimeLibraryUsage)
|
||||
<< attrTagT(_BuildBrowserInformation, tool.BuildBrowserInformation)
|
||||
@ -2057,7 +2051,6 @@ QString VCXProjectWriter::platformToolSetVersion(const DotNET version)
|
||||
case NET2012:
|
||||
return "v110";
|
||||
}
|
||||
Q_ASSERT(!"This MSVC version does not support the PlatformToolSet tag!");
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user