diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-05-29 12:54:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-30 12:49:48 +0200 |
commit | 853a0b764e08d5f910072b6f3fd3ff3f9dc5c0c4 (patch) | |
tree | 85da957c588af29576e3bad82ee1d6a3a10c3e2e /qmake | |
parent | aa1b4c0943187d82e0c313b93559e99226a9c75a (diff) |
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>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 67446b2efe..44fbf20f81 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -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(); } |