1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 21:27:45 +00:00

Fix extra CMake arguments not getting passed

I guess $Args is some kind of protected keyword, because it doesn't work
This commit is contained in:
Joshua Goins 2024-04-25 17:47:41 -04:00
parent df61d55911
commit 286bc1c7f1

View file

@ -8,8 +8,10 @@ $LocalDir = "./local"
$BuildDir = "$LocalDir/build"
$PrefixDir = (Get-Location).Path + "/prefix"
function Configure($Name, $Args = "") {
cmake -B "$BuildDir-$Name" "-DCMAKE_PREFIX_PATH=$PrefixDir" "-DCMAKE_CXX_COMPILER=cl" "-DCMAKE_C_COMPILER=cl" "-DCMAKE_BUILD_TYPE=Debug" "-S" "$LocalDir/$Name" "-DCMAKE_INSTALL_PREFIX=$PrefixDir" $Args
function Configure($Name, $ExtraArgs = "") {
$Command = "cmake -B $BuildDir-$Name -DCMAKE_PREFIX_PATH=$PrefixDir -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DCMAKE_BUILD_TYPE=Debug -S $LocalDir/$Name -DCMAKE_INSTALL_PREFIX=$PrefixDir $ExtraArgs"
Write-Output "Running $Command"
Invoke-Expression $Command
if ($LASTEXITCODE -ne 0) {
throw "Failed to configure $Name"
}