Skip to content

Commit f699bdc

Browse files
committed
Fix CMake build target option
1 parent 589cc89 commit f699bdc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

rebuild_llama.cpp.ps1

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Param (
3838
$version,
3939

4040
[String]
41-
$target="default"
41+
$target
4242
)
4343

4444
$stopwatch = [System.Diagnostics.Stopwatch]::startNew()
@@ -75,10 +75,16 @@ if (!$blasAccelerator) {
7575
}
7676
}
7777

78+
if ($target) {
79+
$buildTargetInformation = "${target}"
80+
} else {
81+
$buildTargetInformation = "(using project defaults)"
82+
}
83+
7884
Write-Host "Building the llama.cpp project..." -ForegroundColor "Yellow"
7985
Write-Host "Version: ${version}" -ForegroundColor "DarkYellow"
8086
Write-Host "BLAS accelerator: ${blasAccelerator}" -ForegroundColor "DarkYellow"
81-
Write-Host "Target: ${target}" -ForegroundColor "DarkYellow"
87+
Write-Host "Build target: ${buildTargetInformation}" -ForegroundColor "DarkYellow"
8288

8389
$openBLASVersion = "0.3.26"
8490

@@ -179,7 +185,7 @@ cmake `
179185
--build . `
180186
--config Release `
181187
--parallel (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors `
182-
--target "${target}"
188+
$(if ($target) { "--target ${target}" })
183189

184190
Copy-Item -Path "../../OpenBLAS/bin/libopenblas.dll" -Destination "./bin/Release/libopenblas.dll"
185191

0 commit comments

Comments
 (0)