PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/mordor/protoc.targets

http://github.com/mozy/mordor
MSBuild | 77 lines | 77 code | 0 blank | 0 comment | 0 complexity | f3f26e25a36d55b1800ded66ad3a725d MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?>
 2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 3  <ItemGroup>
 4    <PropertyPageSchema
 5      Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
 6    <AvailableItemName
 7      Include="Protoc">
 8      <Targets>_Protoc</Targets>
 9    </AvailableItemName>
10  </ItemGroup>
11  <UsingTask
12    TaskName="Protoc"
13    TaskFactory="XamlTaskFactory"
14    AssemblyName="Microsoft.Build.Tasks.v4.0">
15    <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
16  </UsingTask>
17  <Target
18    Name="_Protoc"
19    BeforeTargets="$(ProtocBeforeTargets)"
20    AfterTargets="$(ProtocAfterTargets)"
21    Condition="'@(Protoc)' != ''"
22    DependsOnTargets="$(ProtocDependsOn);ComputeProtocOutput"
23    Outputs="%(Protoc.Outputs)"
24    Inputs="%(Protoc.Identity);%(Protoc.AdditionalDependencies);$(MSBuildProjectFile)">
25    <ItemGroup
26      Condition="'@(SelectedFiles)' != ''">
27      <Protoc
28        Remove="@(Protoc)"
29        Condition="'%(Identity)' != '@(SelectedFiles)'" />
30    </ItemGroup>
31    <ItemGroup>
32      <Protoc_tlog
33        Include="%(Protoc.Outputs)"
34        Condition="'%(Protoc.Outputs)' != '' and '%(Protoc.ExcludedFromBuild)' != 'true'">
35        <Source>@(Protoc, '|')</Source>
36      </Protoc_tlog>
37    </ItemGroup>
38    <Message
39      Importance="High"
40      Text="%(Protoc.ExecutionDescription)" />
41    <WriteLinesToFile
42      Condition="'@(Protoc_tlog)' != '' and '%(Protoc_tlog.ExcludedFromBuild)' != 'true'"
43      File="$(IntDir)$(ProjectName).write.1.tlog"
44      Lines="^%(Protoc_tlog.Source);@(Protoc_tlog-&gt;'%(Fullpath)')" />
45    <Protoc
46      Condition="'@(Protoc)' != '' and '%(Protoc.ExcludedFromBuild)' != 'true'"
47      CommandLineTemplate="%(Protoc.CommandLineTemplate)"
48      IncludePaths="%(Protoc.IncludePaths)"
49      CppOutDir="%(Protoc.CppOutDir)"
50      JavaOutDir="%(Protoc.JavaOutDir)"
51      PythonOutDir="%(Protoc.PythonOutDir)"
52      AdditionalOptions="%(Protoc.AdditionalOptions)"
53      Inputs="%(Protoc.Identity)" />
54  </Target>
55  <PropertyGroup>
56    <ComputeCompileInputsTargets>
57      $(ComputeCompileInputsTargets);
58      ComputeProtocOutput;
59      </ComputeCompileInputsTargets>
60  </PropertyGroup>
61  <Target
62    Name="ComputeProtocOutput"
63    Condition="'@(Protoc)' != ''">
64    <ItemGroup>
65      <ProtocDirsToMake
66        Condition="'@(Protoc)' != '' and '%(Protoc.ExcludedFromBuild)' != 'true'"
67        Include="%(Protoc.Outputs)" />
68      <ClCompile
69        Include="%(ProtocDirsToMake.Identity)"
70        Condition="'%(Extension)'=='.cc'">
71        <DisableSpecificWarnings>4267;%(ClCompile.DisableSpecificWarnings)</DisableSpecificWarnings>
72      </ClCompile>
73    </ItemGroup>
74    <MakeDir
75      Directories="@(ProtocDirsToMake-&gt;'%(RootDir)%(Directory)')" />
76  </Target>
77</Project>