Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Doroshenko committed Dec 2, 2022
2 parents 00af536 + a19fc6f commit 5a3e2d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 48 deletions.
21 changes: 0 additions & 21 deletions IncludeToolboxShared/Commands/TransitiveRemoval.cs

This file was deleted.

2 changes: 0 additions & 2 deletions IncludeToolboxShared/IncludeToolboxShared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
<Compile Include="$(MSBuildThisFileDirectory)Commands\FormatIncludes.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\IncludeGraph.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\RunIWYU.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\TransitiveRemoval.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\TrialAndErrorRemoval_CodeWindow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Commands\TrialAndErrorRemoval_Project.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Graph\IncludeGraph.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Implementation\IncludeFormatter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IncludeToolboxPackage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Options\TransitiveOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ToolWindows\ViewModel\IncludeTreeViewItem.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IWYU\IWYU.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IWYU\IWYUApply.cs" />
Expand Down
24 changes: 0 additions & 24 deletions IncludeToolboxShared/Options/TransitiveOptions.cs

This file was deleted.

8 changes: 7 additions & 1 deletion IncludeToolboxShared/Util/VCUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ public static async Task<IEnumerable<string>> GetIncludeDirsAsync()
var cfg = proj.ActiveConfiguration;
var cl = cfg?.Rules;
if (cl == null) { VS.MessageBox.ShowErrorAsync("IWYU Error:", "Failed to gather Compiler info.").FireAndForget(); return null; }


var com = (IVCRulePropertyStorage2)cl.Item("CL");
var dirs = com.GetEvaluatedPropertyValue("AdditionalIncludeDirectories").Replace('\\','/')

string property = com!=null? "AdditionalIncludeDirectories": "IncludePath";
com ??= (IVCRulePropertyStorage2)cl.Item("ConfigurationDirectories");

var dirs = com.GetEvaluatedPropertyValue(property).Replace('\\','/')
.Split(';').Where(s => !string.IsNullOrWhiteSpace(s)).Select(s=>Path.IsPathRooted(s)?s:Path.Combine(dir, s));
return dirs;
}
Expand Down

0 comments on commit 5a3e2d3

Please sign in to comment.