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:
parent
df61d55911
commit
286bc1c7f1
1 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue