@@ -2377,35 +2377,23 @@ function Test-XCTest {
23772377 }
23782378}
23792379
2380- function Build-Testing ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
2381- $DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
2382- $FoundationBinaryCache = Get-TargetProjectBinaryCache $Arch DynamicFoundation
2383- $SwiftTestingBinaryCache = Get-TargetProjectBinaryCache $Arch Testing
2384-
2385- Isolate- EnvVars {
2386- if ($Test ) {
2387- # TODO: Test
2388- return
2389- } else {
2390- $InstallPath = " $ ( $Arch.SwiftTestingInstallRoot ) \usr"
2380+ function Build-Testing ([Platform ]$Platform , $Arch ) {
2381+ Build-CMakeProject `
2382+ - Src $SourceCache \swift- testing `
2383+ - Bin (Get-TargetProjectBinaryCache $Arch Testing) `
2384+ - InstallTo " $ ( $Arch.SwiftTestingInstallRoot ) \usr" `
2385+ - Arch $Arch `
2386+ - Platform $Platform `
2387+ - UseBuiltCompilers C, CXX, Swift `
2388+ - Defines @ {
2389+ BUILD_SHARED_LIBS = " YES" ;
2390+ CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2391+ dispatch_DIR = (Get-TargetProjectCMakeModules $Arch Dispatch);
2392+ Foundation_DIR = (Get-TargetProjectCMakeModules $Arch DynamicFoundation);
2393+ # TODO: ensure that host and target platform match
2394+ SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2395+ SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
23912396 }
2392-
2393- Build-CMakeProject `
2394- - Src $SourceCache \swift- testing `
2395- - Bin $SwiftTestingBinaryCache `
2396- - InstallTo $InstallPath `
2397- - Arch $Arch `
2398- - Platform $Platform `
2399- - UseBuiltCompilers C, CXX, Swift `
2400- - Defines (@ {
2401- BUILD_SHARED_LIBS = " YES" ;
2402- CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2403- dispatch_DIR = " $DispatchBinaryCache \cmake\modules" ;
2404- Foundation_DIR = " $FoundationBinaryCache \cmake\modules" ;
2405- SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2406- SwiftTesting_MACRO = " $ ( Get-BuildProjectBinaryCache TestingMacros) \TestingMacros.dll" ;
2407- })
2408- }
24092397}
24102398
24112399function Write-PlatformInfoPlist ([Platform ] $Platform ) {
0 commit comments