ファイル
ComputeSharp/src/Directory.Build.targets
T

61 行
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="..\Directory.Build.targets" />
<Target Name="ConfigureAssemblyTrimmingIfNeeded"
BeforeTargets="PrepareForBuild">
<!-- Enable trimming support on .NET 6 -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>
</Target>
<Target Name="EmitSupportedOSVersionAttributeForTargetOS"
BeforeTargets="PrepareForBuild">
<!-- Emit the [SupportedOSVersion] attribute if needed -->
<ItemGroup Condition="'$(SupportedOSVersion)' != ''">
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatformAttribute">
<_Parameter1>$(SupportedOSVersion)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
<!--
The following target has been ported from TerraFX.Interop.Windows.
See: https://github.com/terrafx/terrafx.interop.windows.
-->
<PropertyGroup>
<GeneratedSkipLocalsInitFile Condition="'$(GeneratedSkipLocalsInitFile)' == ''">$(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs</GeneratedSkipLocalsInitFile>
<GeneratedSkipLocalsInitFileLines>
<![CDATA[//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[module: System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]>
</GeneratedSkipLocalsInitFileLines>
</PropertyGroup>
<Target Name="GenerateSkipLocalsInit"
BeforeTargets="BeforeCompile;CoreCompile"
DependsOnTargets="PrepareForBuild"
Condition="'$(Language)' == 'C#'"
Inputs="$(MSBuildAllProjects)"
Outputs="$(GeneratedSkipLocalsInitFile)">
<!-- Write the file with the attribute -->
<WriteLinesToFile Lines="$(GeneratedSkipLocalsInitFileLines)" Overwrite="true" WriteOnlyWhenDifferent="true" File="$(GeneratedSkipLocalsInitFile)" />
<!-- Include the generated file in the list of files to compile -->
<ItemGroup>
<Compile Include="$(GeneratedSkipLocalsInitFile)" />
</ItemGroup>
</Target>
</Project>