-
Notifications
You must be signed in to change notification settings - Fork 852
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
87 lines (69 loc) · 5.11 KB
/
Directory.Build.props
File metadata and controls
87 lines (69 loc) · 5.11 KB
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
<Project>
<!-- Import target frameworks from single source of truth -->
<Import Project="$(MSBuildThisFileDirectory)eng/TargetFrameworks.props" />
<PropertyGroup>
<PackageProjectUrl>https://github.com/dotnet/fsharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/dotnet/fsharp</RepositoryUrl>
<LangVersion Condition="'$(FSharpLangVersion)' != ''">$(FSharpLangVersion)</LangVersion>
<RepoRoot Condition="'$(RepoRoot)' == ''">$(MSBuildThisFileDirectory)</RepoRoot>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<IgnoreMibc Condition="'$(IgnoreMibc)' == ''">$(DotNetBuildSourceOnly)</IgnoreMibc>
<!-- When building the .NET product, there's no need to publish Windows PDBs. Any conversion to Windows PDBs will be done during staging, if necessary. -->
<PublishWindowsPdb Condition="'$(DotNetBuild)' == 'true'">false</PublishWindowsPdb>
</PropertyGroup>
<!--
When developers load the FSharp.Compiler.Service solution we set FSHARPCORE_USE_PACKAGE to true if it hasn't already been set to a value.
This option ensures that building and testing uses the specified FSharp.Core nuget package instead of the local FSharp.Core project.
We also disable arcade and reset certain artifacts and compiler paths to use default ones.
All settings below can be overridden via CLI switches if needed. -->
<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Compiler.Service' and '$(BUILDING_USING_DOTNET)' != 'false'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>
<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Benchmarks' and '$(BUILDING_USING_DOTNET)' != 'false'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>
<!-- Temporary workaround if proj-info is used, allows Ionide's evaluation to work correctly. -->
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>
<!-- pick realsig value -->
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'true' and '$(Configuration)' != 'Proto'">
<OtherFlags Condition="'$(BuildNoRealsig)' == 'true'">$(OtherFlags) --realsig-</OtherFlags>
<OtherFlags Condition="'$(BuildNoRealsig)' != 'true'">$(OtherFlags) --realsig+</OtherFlags>
</PropertyGroup>
<PropertyGroup>
<!-- Set PublishReadyToRun to speed up the build. -->
<EnablePublishReadyToRun>true</EnablePublishReadyToRun>
<!-- Crossgen2 is not built with source-built Mono-based .NET SDKs. -->
<EnablePublishReadyToRun Condition="'$(DotNetBuildUseMonoRuntime)' == 'true'">false</EnablePublishReadyToRun>
</PropertyGroup>
<Import Project="$(RepoRoot)/Directory.Build.props.user" Condition="Exists('$(RepoRoot)/Directory.Build.props.user')" />
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
<DisableAutoSetFscCompilerPath>false</DisableAutoSetFscCompilerPath>
<FSHARPCORE_USE_PACKAGE Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">true</FSHARPCORE_USE_PACKAGE>
<DISABLE_ARCADE Condition="'$(DISABLE_ARCADE)' == ''">true</DISABLE_ARCADE>
<ArtifactsDir>$(MSBuildThisFileDirectory)artifacts/</ArtifactsDir>
<OutputPath>$(ArtifactsDir)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
<IntermediateOutputPath>$(ArtifactsDir)obj/$(MSBuildProjectName)/$(Configuration)/</IntermediateOutputPath>
<!-- Note, that default framework is used here (the one we use for development in the current cycle),
since it's a non-arcade and non-sourcebuild scenario -->
<FsLexPath>$(ArtifactsDir)/bin/fslex/$(Configuration)/$(FSharpNetCoreProductTargetFramework)/$(RuntimeIdentifier)/fslex.dll</FsLexPath>
<FsYaccPath>$(ArtifactsDir)/bin/fsyacc/$(Configuration)/$(FSharpNetCoreProductTargetFramework)/$(RuntimeIdentifier)/fsyacc.dll</FsYaccPath>
<DefineConstants>BUILDING_WITH_LKG;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)/eng/Versions.props" Condition="'$(DISABLE_ARCADE)' == 'true'" />
<Import Project="FSharpBuild.Directory.Build.props" Condition=" '$(FSharpTestCompilerVersion)' == '' " />
<!-- Source-build override: Arcade SDK (imported above) provides $(NetCurrent).
Cannot live in eng/TargetFrameworks.props because it's imported before Arcade. -->
<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<FSharpNetCoreProductTargetFramework>$(NetCurrent)</FSharpNetCoreProductTargetFramework>
</PropertyGroup>
<!-- It's important we set TFM before this, since FSharpTests.Directory.Build.props uses it.
TODO(vlza): this build props looks outdated, since we only use $(FSharpTestCompilerVersion) in TP tests or cambridge suite (which we slowly want to migrate to xUnit).
We probably should remove or revisit it. -->
<Import Project="FSharpTests.Directory.Build.props" Condition=" '$(FSharpTestCompilerVersion)' != '' " />
<ItemGroup>
<!-- If there is a README.md next to a project file, include it (for easier access in the IDE) -->
<None Include="README.md" Condition="Exists('README.md')" />
</ItemGroup>
</Project>