Skip to content

Commit

Permalink
Include language information for headers in the command line
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-jabbour-sonarsource committed Nov 28, 2024
1 parent 12f692f commit 8a21953
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Integration.Vsix/CFamily/VcxProject/CmdBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 8a21953

Please sign in to comment.