Lastly, add `ninja.exe` included with MSVC to the system path (e.g. `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja`).
# Verify the environment is a Developer Shell for MSVC 2019
write-host$env:VSINSTALLDIR
if(($env:VSINSTALLDIR-eq$null)){
Write-Error"`r`nBUILD ERROR - YOUR DEVELOPMENT ENVIRONMENT IS NOT SET UP CORRECTLY`r`nTo build Ollama you must run from an MSVC Developer Shell`r`nSee .\docs\development.md for instructions to set up your dev environment"
exit1
}
$script:SRC_DIR=$(resolve-path"..\..\")
$script:SRC_DIR=$(resolve-path"..\..\")
$script:llamacppDir="../llama.cpp"
$script:llamacppDir="../llama.cpp"
$script:cmakeDefs=@(
$script:cmakeDefs=@(
...
@@ -261,7 +255,7 @@ if ($null -ne $env:HIP_PATH) {
...
@@ -261,7 +255,7 @@ if ($null -ne $env:HIP_PATH) {
)
)
# Make sure the ROCm binary dir is first in the path
# Make sure the ROCm binary dir is first in the path