Define some CMake environment variables

This commit is contained in:
Kenneth Benzie 2024-04-01 16:50:35 +01:00
parent df34f9ca74
commit 426aba161e

View File

@ -85,3 +85,11 @@ Write-Host -NoNewLine "$([char]0x1b)[6 q"
# Remove these aliases to PowerShell builtins which clobber the actaul exes. # Remove these aliases to PowerShell builtins which clobber the actaul exes.
Remove-Item alias:curl Remove-Item alias:curl
Remove-Item alias:wget Remove-Item alias:wget
# Set environment variables
# TODO: Wrap Enter-VsDevShell to also set these?
if ((Get-Command cmake.exe -ErrorAction SilentlyContinue).Source) {
$env:CMAKE_GENERATOR = 'Ninja'
$env:CMAKE_C_COMPILER_LAUNCHER = 'cmake.exe'
$env:CMAKE_CXX_COMPILER_LAUNCHER = 'cmake.exe'
}