Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Sources/Commands/SwiftBuildCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ struct BuildCommandOptions: ParsableArguments {
/// If should link the Swift stdlib statically.
@Flag(name: .customLong("static-swift-stdlib"), inversion: .prefixedNo, help: "Link Swift stdlib statically")
public var shouldLinkStaticSwiftStdlib: Bool = false

/// Which testing libraries to use (and any related options.)
@OptionGroup()
var testLibraryOptions: TestLibraryOptions

func validate() throws {
// If --build-tests was not specified, it does not make sense to enable
// or disable either testing library.
if !buildTests {
if testLibraryOptions.explicitlyEnableXCTestSupport != nil
|| testLibraryOptions.explicitlyEnableSwiftTestingLibrarySupport != nil {
throw StringError("pass --build-tests to build test targets")
}
}
}
}

/// swift-build command namespace
Expand Down