CMake/.gitlab/ci/env.ps1
Brad King 7f9817b7cb Remove unnecessary executable permission from .ps1 scripts
Powershell scripts cannot be launched as commands on Windows.
They must be run through the `powershell` or `pwsh` tool.
2024-04-30 09:33:44 -04:00

13 lines
523 B
PowerShell

$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
# Place temporary files inside job directory.
$tmp = New-Item -Force -ItemType Directory -Path "$pwd\.gitlab\tmp"
$tmp = (New-Object -ComObject Scripting.FileSystemObject).GetFolder("$tmp").ShortPath
Set-Item -Force -Path "env:TEMP" -Value "$tmp"
Set-Item -Force -Path "env:TMP" -Value "$tmp"
$tmp = $null
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
. ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
}