forked from dotnet/msbuild
-
Notifications
You must be signed in to change notification settings - Fork 3
/
dir.traversal.targets
54 lines (41 loc) · 2.51 KB
/
dir.traversal.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Target Name="BuildAllProjects">
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="Build" Projects="@(Project)" Condition="'$(SerializeProjects)'=='true'" Properties="Dummy=%(Identity)"/>
<MSBuild Targets="Build" Projects="@(Project)" Condition="'$(SerializeProjects)'!='true'" BuildInParallel="true" />
</Target>
<Target Name="CleanAllProjects">
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="Clean" Projects="@(Project)" Condition="'$(SerializeProjects)'=='true'" Properties="Dummy=%(Identity)"/>
<MSBuild Targets="Clean" Projects="@(Project)" Condition="'$(SerializeProjects)'!='true'" BuildInParallel="true" />
</Target>
<Target Name="TestAllProjects">
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
however since the project names are unique it will essentially force each to run in its own batch -->
<MSBuild Targets="Test" Projects="@(Project)" Condition="'$(SerializeProjects)'=='true'" Properties="Dummy=%(Identity)"/>
<MSBuild Targets="Test" Projects="@(Project)" Condition="'$(SerializeProjects)'!='true'" BuildInParallel="true" />
</Target>
<PropertyGroup>
<TraversalBuildDependsOn>
BuildAllProjects;
$(TraversalBuildDependsOn);
</TraversalBuildDependsOn>
<TraversalCleanDependsOn>
CleanAllProjects;
$(TraversalCleanDependsOn);
</TraversalCleanDependsOn>
<TraversalTestDependsOn>
TestAllProjects;
$(TraversalTestDependsOn);
</TraversalTestDependsOn>
</PropertyGroup>
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />
<Target Name="Clean" DependsOnTargets="$(TraversalCleanDependsOn)" />
<Target Name="Test" DependsOnTargets="$(TraversalTestDependsOn)" />
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
</Project>