terminal/src/common.build.post.props
Michael Niksa aae938fc33 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.
2019-08-06 06:51:50 -05:00

42 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- By default, binplace our output under the bin/ directory in the root of
the project. The other non-cppwinrt projects are binplaced there as well.
However, Cascadia projects want to be built into an appx, and the wapproj
that consumes them will complain if you do this. So they'll set
NoOutputRedirection before including this props file.
-->
<PropertyGroup Condition="'$(NoOutputRedirection)'!='true'">
<OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\obj\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemGroup>
<Natvis Include="$(SolutionDir)tools\ConsoleTypes.natvis" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<!-- Definition the program database type has to come after Microsoft.Cpp.props or it will be
rewritten to /ZI (edit-and-continue) type every time. -->
<ItemDefinitionGroup>
<ClCompile>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<!-- Exclude our dependencies from static analysis. CAExcludePath can only be
set after we've imported Microsoft.Cpp.targets -->
<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>