Files
msime-windows/scripts/ci/cmake-sccache-args.ps1
luo jiyin 5a5d5dee80 fix(ci): fall back to MSVC when sccache is unavailable (#832)
* fix(ci): fall back to MSVC when sccache is unavailable

* test(ci): build with MSVC after simulated sccache setup failure
2026-10-11 20:39:51 +09:00

19 lines
494 B
PowerShell

<#
.SYNOPSIS
Return CMake launcher arguments when sccache is ready.
.EXAMPLE
./scripts/ci/cmake-sccache-args.ps1 -SetupOutcome success
#>
param(
[Parameter(Mandatory = $true)]
[string]$SetupOutcome
)
if ($SetupOutcome -eq 'success' -and (Get-Command sccache -CommandType Application -ErrorAction SilentlyContinue)) {
'-DCMAKE_C_COMPILER_LAUNCHER=sccache'
'-DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
} else {
Write-Warning 'sccache is unavailable. Build with MSVC directly.'
}