Commit 2c94ecc7 authored by ArnoldZokas's avatar ArnoldZokas

Removed cfg folder in preparation for build configuration refactoring

parent 0e97eb28
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_Clean">
<RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
<MakeDir Directories="@(WorkingDirectories)" />
</Target>
<Target Name="_Compile">
<MSBuild Projects="%(Solution.Identity)" Properties="Configuration=%(Solution.Configuration);Platform=%(Solution.Platform)"
Targets="%(Solution.BuildTarget)" BuildInParallel="true" Condition="%(Solution.CompileGroup) == 'Build'" />
</Target>
<Target Name="_EnsureEnvironment">
<Error Text="Tool &quot;Protoc&quot; could not be found at path $(ProtocExePath)" Condition="!Exists($(ProtocExePath))" />
<Error Text="Tool &quot;Protogen&quot; could not be found at path $(ProtogenExePath)" Condition="!Exists($(ProtogenExePath))" />
</Target>
<Target Name="_GenerateSource" DependsOnTargets="_Clean;_Compile;_EnsureEnvironment">
<PropertyGroup>
<ProtosList>@(Protos)</ProtosList>
<Args>$(ProtosList.Replace(`;`,` `))</Args>
</PropertyGroup>
<Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(BuildTempDirectory)" />
<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>
<Target Name="_CompileGeneratedSource" DependsOnTargets="_CopyGeneratedSource">
<MSBuild Projects="%(Solution.Identity)" Properties="Configuration=%(Solution.Configuration);Platform=%(Solution.Platform)"
Targets="%(Solution.BuildTarget)" BuildInParallel="true" Condition="%(Solution.CompileGroup) == $(CompileGroup)" />
</Target>
<Target Name="_Test" DependsOnTargets="_CompileGeneratedSource">
<Exec Command="&quot;$(NUnitExePath)&quot; %(NUnitTests.Identity) /xml=%(NUnitTests.Filename)%(NUnitTests.Extension).txt" WorkingDirectory="$(BuildTempDirectory)" />
</Target>
<Target Name="_Package" DependsOnTargets="_CopyGeneratedSource">
<Copy SourceFiles="@(PackageContents)" DestinationFolder="$(PackageOutputDirectory)\%(PackageContents.TargetDirectory)\%(PackageContents.RecursiveDir)" />
</Target>
<!--
BENCHMARK - this needs optimising
-->
<Target Name="_GenerateBenchmarkSource" DependsOnTargets="_Clean">
<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="$(BenchmarkTempDirectory)" />
<Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BenchmarkTempDirectory)" />
</Target>
<Target Name="_CompileBenchmarkAssembly">
<ItemGroup>
<BenchmarkSources Include="$(BenchmarkTempDirectory)\GoogleSizeProtoFile.cs" />
<BenchmarkSources Include="$(BenchmarkTempDirectory)\GoogleSpeedProtoFile.cs" />
</ItemGroup>
<Csc TargetType="library" OutputAssembly="$(BenchmarkTempDirectory)\BenchmarkTypes.dll" Optimize="true" Sources="@(BenchmarkSources)"
References="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
</Target>
<Target Name="_PrepareBenchmarkEnvironment">
<ItemGroup>
<BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message1.dat" />
<BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message2.dat" />
<BenchmarkResources Include="$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe" />
</ItemGroup>
<Copy SourceFiles="@(BenchmarkResources)" DestinationFolder="$(BenchmarkTempDirectory)" />
</Target>
<Target Name="_RunBenchmark">
<PropertyGroup>
<Args>Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes google_message1.dat Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes google_message1.dat Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes google_message2.dat Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes google_message2.dat</Args>
</PropertyGroup>
<Exec Command="ProtoBench.exe $(Args)" WorkingDirectory="$(BenchmarkTempDirectory)" />
</Target>
</Project>
\ No newline at end of file
@echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /t:Benchmark
pause
\ No newline at end of file
write-host `nRunning build. Please wait...
$iterations = 10
for ($i=1; $i -le $iterations; $i++)
{
$sw = [System.Diagnostics.StopWatch]::StartNew()
#& $env:windir\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.csproj /m /nologo /v:q
& $env:windir\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.csproj /m /nologo /v:q /t:BuildAll /p:CompileGroup=BuildAll
$sw.Stop()
$msbuildTotalRunTime += $sw.ElapsedMilliseconds
$sw = [System.Diagnostics.StopWatch]::StartNew()
#& "..\nant-0.91-alpha2\bin\NAnt.exe" -buildfile:"..\ProtocolBuffers.build" -nologo -q clean-build
& "..\nant-0.91-alpha2\bin\NAnt.exe" -buildfile:"..\ProtocolBuffers.build" -nologo -q clean-build-all
$sw.Stop()
$nantTotalRunTime += $sw.ElapsedMilliseconds
}
write-host `nMSBuild average speed over $iterations iterations: ($msbuildTotalRunTime/$iterations) milliseconds
write-host NAnt average speed over $iterations iterations: ($nantTotalRunTime/$iterations) milliseconds`n
write-host MSBuild execution speed: ([Math]::Round($(100/$nantTotalRunTime*$msbuildTotalRunTime), 2))% "(as a percentage of NAnt execution speed)"`n
\ No newline at end of file
@echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /l:FileLogger,Microsoft.Build.Engine;logfile=Build.log;append=true;verbosity=diagnostic;encoding=utf-8
pause
\ No newline at end of file
@echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m
pause
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectName>Protocol Buffers</ProjectName>
<BuildConfiguration>Debug</BuildConfiguration>
<CompileGroup>BuildAll</CompileGroup>
<!--Directory Paths-->
<ProjectDirectory>$(MSBuildProjectDirectory)\..</ProjectDirectory>
<BuildTempDirectory>$(ProjectDirectory)\_tmp</BuildTempDirectory>
<BenchmarkTempDirectory>$(ProjectDirectory)\_benchmark</BenchmarkTempDirectory>
<PackageOutputDirectory>$(ProjectDirectory)\_dist</PackageOutputDirectory>
<SourceDirectory>$(ProjectDirectory)\src</SourceDirectory>
<BenchmarkProtosDirectory>$(ProjectDirectory)\benchmarks</BenchmarkProtosDirectory>
<ProtosDirectory>$(ProjectDirectory)\protos</ProtosDirectory>
<LibDirectory>$(ProjectDirectory)\lib</LibDirectory>
<!--File Paths-->
<SolutionFile>$(ProjectDirectory)\src\ProtocolBuffers.sln</SolutionFile>
<!--Tools-->
<ProtocExePath>$(LibDirectory)\protoc.exe</ProtocExePath>
<ProtogenExePath>$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\protogen.exe</ProtogenExePath>
<NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
</PropertyGroup>
<Import Project="Common.targets"/>
<ItemGroup>
<WorkingDirectories Include="$(BuildTempDirectory)" />
<WorkingDirectories Include="$(BenchmarkTempDirectory)" />
<WorkingDirectories Include="$(PackageOutputDirectory)" />
<Solution Include="$(SolutionFile)">
<Configuration>$(BuildConfiguration)</Configuration>
<Platform>Any CPU</Platform>
<BuildTarget>Build</BuildTarget>
<CompileGroup>Build</CompileGroup>
</Solution>
<Solution Include="$(SolutionFile)">
<Configuration>Debug</Configuration>
<Platform>Any CPU</Platform>
<BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup>
</Solution>
<Solution Include="$(SolutionFile)">
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup>
</Solution>
<Solution Include="$(SolutionFile)">
<Configuration>Silverlight2</Configuration>
<Platform>Any CPU</Platform>
<BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup>
</Solution>
<!--<Solution Include="$(ProjectDirectory)\src\ProtocolBuffers/ProtocolBuffersCF.csproj">
<Configuration>$(BuildConfiguration)</Configuration>
<Platform>AnyCPU</Platform>
<BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup>
</Solution>-->
<Protos Include="$(ProtosDirectory)\google\protobuf\descriptor.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\csharp_options.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_csharp_options.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_custom_options.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_embed_optimize_for.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_import.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_mset.proto" />
<Protos Include="$(ProtosDirectory)\google\protobuf\unittest_optimize_for.proto" />
<Protos Include="$(ProtosDirectory)\tutorial\addressbook.proto" />
<GeneratedSource Include="$(BuildTempDirectory)\CSharpOptions.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\DescriptorProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\AddressBookProtos.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestCustomOptionsProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<NUnitTests Include="$(SourceDirectory)\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
<NUnitTests Include="$(SourceDirectory)\Protogen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
<PackageContents Include="$(ProjectDirectory)\readme.txt" />
<PackageContents Include="$(ProjectDirectory)\license.txt" />
<PackageContents Include="$(ProjectDirectory)\protos\**\*.*">
<TargetDirectory>\protos</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtocolBuffers\bin\Debug\Google.ProtocolBuffers.*">
<TargetDirectory>\Debug</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoGen\bin\Debug\ProtoGen.*">
<TargetDirectory>\Debug</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoMunge\bin\Debug\ProtoMunge.*">
<TargetDirectory>\Debug</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoDump\bin\Debug\ProtoDump.*">
<TargetDirectory>\Debug</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoBench\bin\Debug\ProtoBench.*">
<TargetDirectory>\Debug</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtocolBuffers\bin\Release\Google.ProtocolBuffers.*">
<TargetDirectory>\Release</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoGen\bin\Release\ProtoGen.*">
<TargetDirectory>\Release</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoMunge\bin\Release\ProtoMunge.*">
<TargetDirectory>\Release</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoDump\bin\Release\ProtoDump.*">
<TargetDirectory>\Release</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtoBench\bin\Release\ProtoBench.*">
<TargetDirectory>\Release</TargetDirectory>
</PackageContents>
<PackageContents Include="$(SourceDirectory)\ProtocolBuffers\bin\Silverlight2\Google.ProtocolBuffers.*">
<TargetDirectory>\Silverlight2</TargetDirectory>
</PackageContents>
<!--<PackageContents Include="$(SourceDirectory)\ProtocolBuffers\bin\ReleaseCF\Google.ProtocolBuffers.*">
<TargetDirectory>\CompactFramework35</TargetDirectory>
</PackageContents>-->
<PackageContents Include="$(LibDirectory)\Protoc*">
<TargetDirectory>\Protoc</TargetDirectory>
</PackageContents>
</ItemGroup>
<!--target groups-->
<Target Name="Build" DependsOnTargets="_GenerateSource;_CopyGeneratedSource;_CompileGeneratedSource;_Test;_Package" />
<Target Name="BuildAll" DependsOnTargets="_GenerateSource;_CopyGeneratedSource;_CompileGeneratedSource;_Test;_Package" />
<Target Name="Benchmark" DependsOnTargets="_GenerateBenchmarkSource;_CompileBenchmarkAssembly;_PrepareBenchmarkEnvironment;_RunBenchmark" />
</Project>
@echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /t:BuildAll /p:CompileGroup=BuildAll /m
pause
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment