diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index b968033cc..0941fa6c9 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -81,6 +81,7 @@ diff --git a/build_projects/dotnet-cli-build/DotNetBuild.cs b/build_projects/dotnet-cli-build/DotNetBuild.cs index fbe0dcae4..f11ec52f4 100644 --- a/build_projects/dotnet-cli-build/DotNetBuild.cs +++ b/build_projects/dotnet-cli-build/DotNetBuild.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build protected override string Args { - get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; } + get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()} {GetMaxCpuCount()}"; } } public string BuildBasePath { get; set; } @@ -26,7 +26,9 @@ namespace Microsoft.DotNet.Cli.Build public string ProjectPath { get; set; } public string OutputPath { get; set; } - + + public string MaxCpuCount { get; set; } + private string GetOutputPath() { if (!string.IsNullOrEmpty(OutputPath)) @@ -76,5 +78,15 @@ namespace Microsoft.DotNet.Cli.Build return null; } + + private string GetMaxCpuCount() + { + if (!string.IsNullOrEmpty(MaxCpuCount)) + { + return $"/maxcpucount:{MaxCpuCount}"; + } + + return null; + } } }