aboutsummaryrefslogtreecommitdiff
path: root/build/Common.targets
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2011-04-03 20:15:29 +0100
committerJon Skeet <skeet@pobox.com>2011-04-03 20:15:29 +0100
commitbf9821e0749de1b45e4167afc4fa941295dd9bf2 (patch)
tree72b594662d92b8156779d3bd34b4b436017a633b /build/Common.targets
parentce58e301534fd6cd1cf04f388318601112876732 (diff)
downloadprotobuf-bf9821e0749de1b45e4167afc4fa941295dd9bf2.tar.gz
protobuf-bf9821e0749de1b45e4167afc4fa941295dd9bf2.tar.bz2
protobuf-bf9821e0749de1b45e4167afc4fa941295dd9bf2.zip
Fixes to package generation, and convert all tabs to spaces in MSBuild files.
Diffstat (limited to 'build/Common.targets')
-rw-r--r--build/Common.targets148
1 files changed, 74 insertions, 74 deletions
diff --git a/build/Common.targets b/build/Common.targets
index 07b93ebd..59f431bd 100644
--- a/build/Common.targets
+++ b/build/Common.targets
@@ -10,8 +10,8 @@
</Target>
<Target Name="_Clean">
- <RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
- <MakeDir Directories="@(WorkingDirectories)" />
+ <RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
+ <MakeDir Directories="@(WorkingDirectories)" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Clean;BuildConfiguration=$(BuildConfiguration)" Targets="_BuildSolution" ContinueOnError="true" />
</Target>
@@ -24,13 +24,13 @@
<MSBuild Projects="$(MSBuildProjectFullPath)" Properties="Step=Two;SolutionTarget=Build;BuildConfiguration=$(BuildConfiguration)" Targets="_BuildSolution" />
</Target>
- <Target Name="_GenerateSource">
+ <Target Name="_GenerateSource">
<Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb @(Protos->'%(RelativeDir)%(Filename)%(Extension)', ' ')" WorkingDirectory="$(BuildTempDirectory)" />
- <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
- </Target>
+ <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
+ </Target>
- <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
- <Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
+ <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
+ <Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
</Target>
<Target Name="_Test" DependsOnTargets="_CompileGeneratedSource" Condition="$(BuildConfiguration)=='Debug' or $(BuildConfiguration)=='Release'">
@@ -38,74 +38,74 @@
</Target>
<Target Name="_RunTests">
- <Exec Command="&quot;$(NUnitExePath)&quot; /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml" />
- </Target>
-
- <!--## Package Generation ##-->
- <Target Name="_CleanOutputDirectory">
- <RemoveDir Directories="$(BuildOutputDirectory)" ContinueOnError="true" />
- <MakeDir Directories="$(BuildOutputDirectory)" ContinueOnError="true" />
- </Target>
-
- <Target Name="_PreparePackageComponent">
- <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
- </Target>
-
- <Target Name="_GeneratePackage">
- <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
- <Exec Command="&quot;$(ZipExePath)&quot; a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" />
-
- </Target>
-
- <!--## Benchmark ##-->
- <Target Name="_GenerateBenchmarkSource" DependsOnTargets="_Clean;_Compile">
- <PropertyGroup>
- <Args>$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto</Args>
- </PropertyGroup>
-
- <Exec Command="$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(BuildTempDirectory)" />
- <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
- </Target>
-
- <Target Name="_CompileBenchmarkAssembly" DependsOnTargets="_GenerateBenchmarkSource">
- <ItemGroup>
- <BenchmarkSources Include="$(BuildTempDirectory)\GoogleSizeProtoFile.cs" />
+ <Exec Command="&quot;$(NUnitExePath)&quot; /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml" />
+ </Target>
+
+ <!--## Package Generation ##-->
+ <Target Name="_CleanOutputDirectory">
+ <RemoveDir Directories="$(ProjectDirectory)\build_output\Package" ContinueOnError="true" />
+ <RemoveDir Directories="$(ProjectDirectory)\build_output" ContinueOnError="true" />
+ <MakeDir Directories="$(ProjectDirectory)\build_output" ContinueOnError="true" />
+ </Target>
+
+ <Target Name="_PreparePackageComponent">
+ <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(ProjectDirectory)\build_output\Package\$(BuildConfiguration)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
+ </Target>
+
+ <Target Name="_GeneratePackage">
+ <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(ProjectDirectory)\build_output\Package\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
+ <Exec Command="&quot;$(ZipExePath)&quot; a -tzip ..\$(PackageName) * -r" WorkingDirectory="$(ProjectDirectory)\build_output\Package" />
+ </Target>
+
+ <!--## Benchmark ##-->
+ <Target Name="_GenerateBenchmarkSource" DependsOnTargets="_Clean;_Compile">
+ <PropertyGroup>
+ <Args>$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto</Args>
+ </PropertyGroup>
+
+ <Exec Command="$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(BuildTempDirectory)" />
+ <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
+ </Target>
+
+ <Target Name="_CompileBenchmarkAssembly" DependsOnTargets="_GenerateBenchmarkSource">
+ <ItemGroup>
+ <BenchmarkSources Include="$(BuildTempDirectory)\GoogleSizeProtoFile.cs" />
<BenchmarkSources Include="$(BuildTempDirectory)\GoogleSpeedProtoFile.cs" />
<BenchmarkSources Include="$(SourceDirectory)\ProtoBench\Properties\AssemblyInfo.cs" />
- </ItemGroup>
-
- <Csc TargetType="library" OutputAssembly="$(BuildTempDirectory)\BenchmarkTypes.dll" Optimize="true" Sources="@(BenchmarkSources)" References="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
- </Target>
-
- <Target Name="_PrepareBenchmarkEnvironment" DependsOnTargets="_CompileBenchmarkAssembly">
- <ItemGroup>
- <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message1.dat" />
- <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message2.dat" />
- <BenchmarkResources Include="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
- <BenchmarkResources Include="$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe" />
- </ItemGroup>
-
- <Copy SourceFiles="@(BenchmarkResources)" DestinationFolder="$(BuildTempDirectory)" />
- </Target>
-
- <Target Name="_RunBenchmarks" DependsOnTargets="_PrepareBenchmarkEnvironment">
- <ItemGroup>
- <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes" />
- <BenchmarkParameter Include="google_message1.dat" />
- <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes" />
- <BenchmarkParameter Include="google_message1.dat" />
- <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes" />
- <BenchmarkParameter Include="google_message2.dat" />
- <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes" />
- <BenchmarkParameter Include="google_message2.dat" />
- </ItemGroup>
-
- <PropertyGroup>
- <BenchmarkParameterList>@(BenchmarkParameter)</BenchmarkParameterList>
- <Args>$(BenchmarkParameterList.Replace(`;`,` `))</Args>
- </PropertyGroup>
-
- <Exec Command="&quot;$(ProtoBenchExePath)&quot; @(BenchmarkParameter->'%(Identity)', ' ') > &quot;$(BuildTempDirectory)\..\BenchmarkResults.txt&quot;" WorkingDirectory="$(BuildTempDirectory)" />
- </Target>
+ </ItemGroup>
+
+ <Csc TargetType="library" OutputAssembly="$(BuildTempDirectory)\BenchmarkTypes.dll" Optimize="true" Sources="@(BenchmarkSources)" References="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
+ </Target>
+
+ <Target Name="_PrepareBenchmarkEnvironment" DependsOnTargets="_CompileBenchmarkAssembly">
+ <ItemGroup>
+ <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message1.dat" />
+ <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message2.dat" />
+ <BenchmarkResources Include="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
+ <BenchmarkResources Include="$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe" />
+ </ItemGroup>
+
+ <Copy SourceFiles="@(BenchmarkResources)" DestinationFolder="$(BuildTempDirectory)" />
+ </Target>
+
+ <Target Name="_RunBenchmarks" DependsOnTargets="_PrepareBenchmarkEnvironment">
+ <ItemGroup>
+ <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes" />
+ <BenchmarkParameter Include="google_message1.dat" />
+ <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes" />
+ <BenchmarkParameter Include="google_message1.dat" />
+ <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes" />
+ <BenchmarkParameter Include="google_message2.dat" />
+ <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes" />
+ <BenchmarkParameter Include="google_message2.dat" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <BenchmarkParameterList>@(BenchmarkParameter)</BenchmarkParameterList>
+ <Args>$(BenchmarkParameterList.Replace(`;`,` `))</Args>
+ </PropertyGroup>
+
+ <Exec Command="&quot;$(ProtoBenchExePath)&quot; @(BenchmarkParameter->'%(Identity)', ' ') > &quot;$(BuildTempDirectory)\..\BenchmarkResults.txt&quot;" WorkingDirectory="$(BuildTempDirectory)" />
+ </Target>
</Project> \ No newline at end of file