This repository was archived by the owner on Apr 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 329
/
Copy pathCompiler.csproj
101 lines (85 loc) · 5.3 KB
/
Compiler.csproj
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath32)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath32)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildThisFileDirectory)\build\internal\Common.Internal.props" />
<PropertyGroup>
<ProjectGuid>{21E175D5-BBDD-4B63-8FB7-38899BF2F9D1}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Compiler</RootNamespace>
<AssemblyName>Compiler</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<!-- Set the CMake build type to use when building gbc. Options are Debug,
MinSizeRel, Release, and RelWithDebInfo.
The default mapping is:
* MSBuild Debug -> CMake Debug
* MSbuild Release -> CMake RelWithDebInfo
WARNING: the CMake MinSizeRel build will likely increase your build
time by over an hour and only works if you also delete you Stack
snapshots first.
-->
<BondCompilerCMakeBuildType
Condition=" ('$(BondCompilerCMakeBuildType)' == '') And ('$(Configuration)' == 'Release') ">RelWithDebInfo</BondCompilerCMakeBuildType>
<BondCompilerCMakeBuildType
Condition=" ('$(BondCompilerCMakeBuildType)' == '') And ('$(Configuration)' != 'Release') ">Debug</BondCompilerCMakeBuildType>
</PropertyGroup>
<ItemGroup>
<None Include="$(ProjectDir)..\compiler\bond.cabal" />
<None Include="$(ProjectDir)..\compiler\Main.hs" />
<None Include="$(ProjectDir)..\compiler\IO.hs" />
<None Include="$(ProjectDir)..\compiler\Options.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Lexer.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Parser.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Util.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Syntax\Internal.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Syntax\JSON.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Syntax\SchemaDef.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Syntax\Types.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Syntax\Util.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\CustomMapping.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\TypeMapping.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Util.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Templates.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\ApplyOverloads.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Apply_cpp.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Apply_h.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Enum_h.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Reflection_h.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Types_cpp.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Types_h.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cpp\Util.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cs\Types_cs.hs" />
<None Include="$(ProjectDir)..\compiler\src\Language\Bond\Codegen\Cs\Util.hs" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)\build\internal\Common.Internal.targets" />
<PropertyGroup>
<BuildDependsOn Condition="'$(OS)' == 'Windows_NT'">
ExternalBuild
</BuildDependsOn>
<BuildDependsOn Condition="'$(OS)' != 'Windows_NT'">
SkipExternalBuild
</BuildDependsOn>
</PropertyGroup>
<Target Name="ExternalBuild"
Inputs="$(ProjectDir)\..\compiler\CMakeLists.txt;@(None)"
Outputs="$(ProjectDir)\tools\gbc.exe">
<Message Text="Building Bond Compiler..." Importance="High" />
<MakeDir Directories="$(IntermediateOutputPath)" />
<!-- In some of the CI build systems we use, Stack isn't on the path.
The MSBuild property/environment variable STACK_PATH can be used to
specify a location, and we'll forward that on to CMake. -->
<PropertyGroup>
<_BondCmakeProgramPath></_BondCmakeProgramPath>
<!-- We use the \. trick to avoid problems with quoting a quote mark
if STACK_PATH ends with a trailing slash. -->
<_BondCmakeProgramPath Condition=" '$(STACK_PATH)' != '' ">"-DCMAKE_PROGRAM_PATH=$(STACK_PATH)\."</_BondCmakeProgramPath>
</PropertyGroup>
<Exec Command="cmake $(ProjectDir)\..\compiler $(_BondCmakeProgramPath) -Wno-dev" WorkingDirectory="$(IntermediateOutputPath)" />
<Exec Command="cmake --build . --config $(BondCompilerCMakeBuildType) --target gbc" WorkingDirectory="$(IntermediateOutputPath)" />
<Copy SourceFiles="$(IntermediateOutputPath)\build\gbc\gbc.exe" DestinationFolder="$(ProjectDir)\tools\" />
</Target>
<Target Name="SkipExternalBuild">
<Message Text="Skipping external building because it's only for Windows" Importance="High" />
</Target>
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
</Project>