From 8a2195336034f8a9d571c3a7fdffb298f707c9cb Mon Sep 17 00:00:00 2001 From: Michael Jabbour Date: Thu, 28 Nov 2024 21:13:55 +0100 Subject: [PATCH] Include language information for headers in the command line --- src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs b/src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs index 5774d6170f..da62745f70 100644 --- a/src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs +++ b/src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs @@ -169,7 +169,14 @@ internal void AddOptFromProperties(IVCRulePropertyStorage properties) var compileAs = properties.GetEvaluatedPropertyValue("CompileAs"); if (IsHeader) { - HeaderFileLang = (compileAs == "CompileAsC") ? "c" : "cpp"; + if (compileAs == "CompileAsC") + { + HeaderFileLang = "c"; + AddCmdOpt("/TC"); + } else { + HeaderFileLang = "cpp"; + AddCmdOpt("/TP"); + } } else {