Browse Source

Build: cleanup, fix F# NoWarn entries, pack using msbuild

build
Christoph Ruegg 8 years ago
parent
commit
27e186f486
  1. 33
      build.fsx
  2. 9
      build/build-framework.fsx
  3. 2
      src/FSharp/FSharp.fsproj
  4. 2
      src/FSharpUnitTests/FSharpUnitTests.fsproj

33
build.fsx

@ -344,22 +344,14 @@ Target "ApplyVersion" (fun _ ->
patchVersionInResource "src/NativeProviders/CUDA/resource.rc" cudaRelease
patchVersionInResource "src/NativeProviders/OpenBLAS/resource.rc" openBlasRelease)
Target "DotnetRestore" (fun _ ->
Target "Restore" (fun _ ->
restore "MathNet.Numerics.sln"
restore "MathNet.Numerics.Data.sln")
//DotNetCli.Restore (fun p ->
// { p with
// Project = "MathNet.Numerics.sln"
// NoCache = false })
//DotNetCli.Restore (fun p ->
// { p with
// Project = "MathNet.Numerics.Data.sln"
// NoCache = false }))
Target "Prepare" DoNothing
"Start"
=?> ("Clean", not (hasBuildParam "incremental"))
==> "DotnetRestore"
==> "Restore"
==> "ApplyVersion"
==> "Prepare"
@ -368,23 +360,8 @@ Target "Prepare" DoNothing
// BUILD
// --------------------------------------------------------------------------------------
//let dotnetBuild configuration solution = DotNetCli.Build (fun p ->
// { p with
// Project = solution
// Configuration = configuration
// AdditionalArgs = ["--no-restore"]})
Target "BuildMain" (fun _ ->
build "MathNet.Numerics.sln")
//MSBuildHelper.build (fun p ->
// { p with
// Targets = [ (if hasBuildParam "incremental" then "Build" else "Rebuild") ]
// Properties = [ "Configuration", "Release" ]
// RestorePackagesFlag = false
// Verbosity = Some MSBuildVerbosity.Minimal
// }) "MathNet.Numerics.sln")
//MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [ "Configuration", "Release" ] (!!"MathNet.Numerics.sln") |> ignore)
//Target "BuildSigned" (fun _ -> dotnetBuild "Release-StrongName" "MathNet.Numerics.sln")
Target "Build" DoNothing
@ -547,14 +524,14 @@ Target "OpenBlasWinZip" (fun _ ->
// NUGET
let dotnetPack solution = DotNetCli.Pack (fun p ->
let defaultArgs = ["--no-restore"; "--no-build" ]
{ p with
Project = solution
Configuration = "Release"
AdditionalArgs = defaultArgs})
AdditionalArgs = ["--no-restore"; "--no-build" ]})
Target "NuGet" (fun _ ->
dotnetPack "MathNet.Numerics.sln"
pack "MathNet.Numerics.sln"
//dotnetPack "MathNet.Numerics.sln"
CopyDir "out/packages/NuGet" "src/Numerics/bin/Release/" (fun n -> n.EndsWith(".nupkg"))
CopyDir "out/packages/NuGet" "src/FSharp/bin/Release/" (fun n -> n.EndsWith(".nupkg")))
//CleanDir "out/packages/NuGet"

9
build/build-framework.fsx

@ -132,19 +132,20 @@ let patchVersionInProjectFile path (release:Release) =
// BUILD
// --------------------------------------------------------------------------------------
let msbuild targets project =
let msbuild targets configuration project =
MSBuildHelper.build (fun p ->
{ p with
NoLogo = true
NodeReuse = true
Targets = targets
Properties = [ "Configuration", "Release" ]
Properties = [ "Configuration", configuration ]
RestorePackagesFlag = false
Verbosity = Some MSBuildVerbosity.Minimal
}) project
let restore project = msbuild [ "Restore" ] project
let build project = msbuild [ (if hasBuildParam "incremental" then "Build" else "Rebuild") ] project
let restore project = msbuild [ "Restore" ] "Release" project
let build project = msbuild [ (if hasBuildParam "incremental" then "Build" else "Rebuild") ] "Release" project
let pack project = msbuild [ "Pack" ] "Release" project
//let buildConfig config subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [ "Configuration", config ] subject |> ignore
//let build subject = buildConfig "Release" subject

2
src/FSharp/FSharp.fsproj

@ -37,7 +37,7 @@ BUG: Trigonometry: Fix imaginary part sign of complex hyperbolic cotangent</Pack
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>FS2003</NoWarn>
<NoWarn>2003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<DefineConstants>NETSTANDARD</DefineConstants>

2
src/FSharpUnitTests/FSharpUnitTests.fsproj

@ -7,7 +7,7 @@
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
<NoWarn>FS0044;FS2003</NoWarn>
<NoWarn>44;2003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('netcoreapp')) OR $(TargetFramework.Contains('netstandard'))">
<DefineConstants>NETSTANDARD</DefineConstants>

Loading…
Cancel
Save