summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-05-29 10:54:15 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-19 15:46:44 (GMT)
commit8dc37368441d13f41f029b4191ce734a9758d2c8 (patch)
tree6aa37c56e3e1347688c472a37d22178ca8a57221 /qmake
parent6eb9d1e37f2c316cdea441c838691fd5168a6919 (diff)
downloadQt-8dc37368441d13f41f029b4191ce734a9758d2c8.zip
Qt-8dc37368441d13f41f029b4191ce734a9758d2c8.tar.gz
Qt-8dc37368441d13f41f029b4191ce734a9758d2c8.tar.bz2
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> (cherry picked from commit 853a0b764e08d5f910072b6f3fd3ff3f9dc5c0c4)
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index ff02f179..5a54779 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -181,6 +181,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";
@@ -450,10 +451,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)
@@ -649,10 +646,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)
@@ -1566,6 +1559,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)
@@ -1976,7 +1970,6 @@ QString VCXProjectWriter::platformToolSetVersion(const DotNET version)
case NET2013:
return "v120";
}
- Q_ASSERT(!"This MSVC version does not support the PlatformToolSet tag!");
return QString();
}