@@ -16,6 +16,7 @@ import Foundation
16
16
@main
17
17
struct CMakeSmokeTest : CommandPlugin {
18
18
func performCommand( context: PluginContext , arguments: [ String ] ) async throws {
19
+ print ( arguments)
19
20
var args = ArgumentExtractor ( arguments)
20
21
let hostOS = try OS . host ( )
21
22
@@ -33,6 +34,7 @@ struct CMakeSmokeTest: CommandPlugin {
33
34
if let sysrootPath {
34
35
print ( " using sysroot at \( sysrootPath) " )
35
36
}
37
+ let extraCMakeArgs = args. extractOption ( named: " extra-cmake-arg " )
36
38
37
39
let moduleCachePath = context. pluginWorkDirectoryURL. appending ( component: " module-cache " ) . path ( )
38
40
@@ -43,6 +45,9 @@ struct CMakeSmokeTest: CommandPlugin {
43
45
let swiftToolsSupportCoreURL = try findDependency ( " swift-tools-support-core " , pluginContext: context)
44
46
let swiftToolsSupportCoreBuildURL = context. pluginWorkDirectoryURL. appending ( component: " swift-tools-support-core " )
45
47
48
+ exit ( 1 )
49
+
50
+
46
51
let swiftSystemURL = try findDependency ( " swift-system " , pluginContext: context)
47
52
let swiftSystemBuildURL = context. pluginWorkDirectoryURL. appending ( component: " swift-system " )
48
53
@@ -80,7 +85,7 @@ struct CMakeSmokeTest: CommandPlugin {
80
85
" -DCMAKE_MAKE_PROGRAM= \( ninjaPath) " ,
81
86
" -DCMAKE_BUILD_TYPE:=Debug " ,
82
87
" -DCMAKE_Swift_FLAGS=' \( sharedSwiftFlags. joined ( separator: " " ) ) ' "
83
- ] + cMakeProjectArgs
88
+ ] + cMakeProjectArgs + extraCMakeArgs
84
89
85
90
print ( " Building swift-tools-support-core " )
86
91
try await Process . checkNonZeroExit ( url: cmakeURL, arguments: sharedCMakeArgs + [ swiftToolsSupportCoreURL. path ( ) ] , workingDirectory: swiftToolsSupportCoreBuildURL)
0 commit comments