From 6008eb525ecdb7dea9e2b99234e0f1a1d5388a8c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 11 Feb 2013 23:51:18 +0100 Subject: [PATCH] qmake: added CompileAsWinRT switch to the VCCLCompilerTool (the cl /ZW option) Change-Id: I2a67779bcb38af85a2c43d3e9a15aa3ba45b4788 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msbuild_objectmodel.cpp | 2 ++ qmake/generators/win32/msvc_objectmodel.cpp | 7 +++++++ qmake/generators/win32/msvc_objectmodel.h | 1 + 3 files changed, 10 insertions(+) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 012c23b675..e96455bea1 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -89,6 +89,7 @@ const char _CLRUnmanagedCodeCheck[] = "CLRUnmanagedCodeCheck"; const char _Command[] = "Command"; const char _CompileAs[] = "CompileAs"; const char _CompileAsManaged[] = "CompileAsManaged"; +const char _CompileAsWinRT[] = "CompileAsWinRT"; const char _ConfigurationType[] = "ConfigurationType"; const char _CPreprocessOptions[] = "CPreprocessOptions"; const char _CreateHotpatchableImage[] = "CreateHotpatchableImage"; @@ -1389,6 +1390,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool) << attrTagS(_CallingConvention, toString(tool.CallingConvention)) << attrTagS(_CompileAs, toString(tool.CompileAs)) << attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged)) + << attrTagT(_CompileAsWinRT, tool.CompileAsWinRT) << attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage) << attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat)) << attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions) diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 3b570c1161..dab06f5f01 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -320,6 +320,7 @@ VCCLCompilerTool::VCCLCompilerTool() CallingConvention(callConventionDefault), CompileAs(compileAsDefault), CompileAsManaged(managedDefault), + CompileAsWinRT(unset), CompileOnly(unset), DebugInformationFormat(debugDisabled), DefaultCharIsUnsigned(unset), @@ -942,6 +943,12 @@ bool VCCLCompilerTool::parseOption(const char* option) found = false; break; } break; + case 'W': + if (third == '-') + CompileAsWinRT = _False; + else + CompileAsWinRT = _True; + break; default: found = false; break; } diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 6473a8845a..4552e8e487 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -511,6 +511,7 @@ public: callingConventionOption CallingConvention; CompileAsOptions CompileAs; compileAsManagedOptions CompileAsManaged; + triState CompileAsWinRT; triState CompileOnly; debugOption DebugInformationFormat; triState DefaultCharIsUnsigned;