From 426aba161e1e44150bdd14e67ad003d846daf857 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 1 Apr 2024 16:50:35 +0100 Subject: [PATCH] Define some CMake environment variables --- profile.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/profile.ps1 b/profile.ps1 index 160b847..7feaee6 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -85,3 +85,11 @@ Write-Host -NoNewLine "$([char]0x1b)[6 q" # Remove these aliases to PowerShell builtins which clobber the actaul exes. Remove-Item alias:curl 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' +}