Add --no-dependency flag to build
This commit is contained in:
parent
41fd92222d
commit
a0990a518c
7 changed files with 109 additions and 47 deletions
|
@ -26,6 +26,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string _cppCompilerFlags;
|
||||
private bool _buildProfile;
|
||||
private bool _noIncremental;
|
||||
private bool _noDependencies;
|
||||
|
||||
private string OutputOption
|
||||
{
|
||||
|
@ -166,6 +167,16 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
}
|
||||
}
|
||||
|
||||
private string NoDependencies
|
||||
{
|
||||
get
|
||||
{
|
||||
return _noDependencies ?
|
||||
"--no-dependencies" :
|
||||
"";
|
||||
}
|
||||
}
|
||||
|
||||
public BuildCommand(
|
||||
string projectPath,
|
||||
string output="",
|
||||
|
@ -181,11 +192,11 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
bool nativeCppMode=false,
|
||||
string cppCompilerFlags="",
|
||||
bool buildProfile=true,
|
||||
bool noIncremental=false
|
||||
bool noIncremental=false,
|
||||
bool noDependencies=false
|
||||
)
|
||||
: base("dotnet")
|
||||
{
|
||||
|
||||
_projectPath = projectPath;
|
||||
_project = ProjectReader.GetProject(projectPath);
|
||||
|
||||
|
@ -203,6 +214,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
_cppCompilerFlags = cppCompilerFlags;
|
||||
_buildProfile = buildProfile;
|
||||
_noIncremental = noIncremental;
|
||||
_noDependencies = noDependencies;
|
||||
}
|
||||
|
||||
public override CommandResult Execute(string args = "")
|
||||
|
@ -226,7 +238,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
private string BuildArgs()
|
||||
{
|
||||
return $"{BuildProfile} {NoIncremental} \"{_projectPath}\" {OutputOption} {BuildBasePathOption} {ConfigurationOption} {FrameworkOption} {NoHostOption} {NativeOption} {ArchitectureOption} {IlcArgsOption} {IlcPathOption} {AppDepSDKPathOption} {NativeCppModeOption} {CppCompilerFlagsOption}";
|
||||
return $"{BuildProfile} {NoDependencies} {NoIncremental} \"{_projectPath}\" {OutputOption} {BuildBasePathOption} {ConfigurationOption} {FrameworkOption} {NoHostOption} {NativeOption} {ArchitectureOption} {IlcArgsOption} {IlcPathOption} {AppDepSDKPathOption} {NativeCppModeOption} {CppCompilerFlagsOption}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue