File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,21 @@ struct BuildCommandOptions: ParsableArguments {
104
104
/// If should link the Swift stdlib statically.
105
105
@Flag ( name: . customLong( " static-swift-stdlib " ) , inversion: . prefixedNo, help: " Link Swift stdlib statically " )
106
106
public var shouldLinkStaticSwiftStdlib : Bool = false
107
+
108
+ /// Which testing libraries to use (and any related options.)
109
+ @OptionGroup ( )
110
+ var testLibraryOptions : TestLibraryOptions
111
+
112
+ func validate( ) throws {
113
+ // If --build-tests was not specified, it does not make sense to enable
114
+ // or disable either testing library.
115
+ if !buildTests {
116
+ if testLibraryOptions. explicitlyEnableXCTestSupport != nil
117
+ || testLibraryOptions. explicitlyEnableSwiftTestingLibrarySupport != nil {
118
+ throw StringError ( " pass --build-tests to build test targets " )
119
+ }
120
+ }
121
+ }
107
122
}
108
123
109
124
/// swift-build command namespace
You can’t perform that action at this time.
0 commit comments