-
Notifications
You must be signed in to change notification settings - Fork 163
/
compiletests.targets
26 lines (26 loc) · 1.56 KB
/
compiletests.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="CompileTest">
<CompileTestSourceDir>$(MSBuildThisFileDirectory)compiletests\</CompileTestSourceDir>
<CompileTestBuildDir>$(SolutionDir)build\$(Platform)\$(Configuration)\compiletests\</CompileTestBuildDir>
</PropertyGroup>
<ItemGroup>
<CompileTestTarget Include="..\sakura_core\basis\CLaxInteger.h" />
<CompileTestTarget Include="..\sakura_core\basis\CStrictInteger.h" />
<CompileTestTarget Include="..\sakura_core\basis\SakuraBasis.h" />
</ItemGroup>
<Target Name="MakeCompileTestBuildDir" Condition="!Exists('$(CompileTestBuildDir)')">
<MakeDir Directories="$(CompileTestBuildDir)" />
</Target>
<Target Name="RunCompileTests" DependsOnTargets="MakeCompileTestBuildDir" BeforeTargets="ClCompile" Inputs="@(CompileTestTarget)" Outputs="$(CompileTestBuildDir)CMakeCache.txt">
<PropertyGroup>
<VsVersion>$([System.Text.RegularExpressions.Regex]::Replace('$(VisualStudioVersion)', '^(\d+).*', '$1'))</VsVersion>
</PropertyGroup>
<SetEnv name="platform" value="$(Platform)" prefix="false" />
<SetEnv name="configuration" value="$(Configuration)" prefix="false" />
<SetEnv name="NUM_VSVERSION" value="$(VsVersion)" prefix="false" />
<Exec Command="$(MSBuildThisFileDirectory)compiletests.run.cmd "$(CompileTestBuildDir)"" ConsoleToMSBuild="true" />
</Target>
<Target Name="AppendCleanTargetsForCompileTest" BeforeTargets="CoreClean">
<RemoveDir Directories="$(CompileTestBuildDir)" />
</Target>
</Project>