Attempt to clean up PCHs as we build to leave more Hosted Agent disk space (#2271)

* Cleanup PCHs as the build rolls along to leave enough space on CI agents.

* Attempt to restrict pch cleanup to only CI agents.

* Write message when objects are deleted.
This commit is contained in:
Michael Niksa 2019-08-06 04:51:50 -07:00 committed by Mike Griese
parent b495ad255f
commit aae938fc33

View file

@ -30,4 +30,12 @@
<PropertyGroup>
<CAExcludePath>$(SolutionDir)\dep\;$(CAExcludePath)</CAExcludePath>
</PropertyGroup>
<Target Name="CleanUpPrecompForSmallCIAgents" AfterTargets="AfterBuild" Condition="'$(AGENT_ID)' != ''">
<ItemGroup>
<FilesToClean Include="$(IntDir)\**\*.pch" />
<FilesToClean Include="$(IntDir)\**\precomp.obj" />
</ItemGroup>
<Delete Files="@(FilesToClean)"/>
<Message Text="PCH and Precomp objects have been deleted for $(ProjectName)." />
</Target>
</Project>