Building toolchain on Windows issues

Hello,

I'm trying to perform a toolchain build on Windows by following the Building Swift on Windows documentation, however I believe my computer is not setup properly as Cmake and Ninja are not found on the Path.

I have Visual Studio Community 2019 installed with the following components:

I also ave Visual Studio Community 2026 installed with the following components:

When I launch a Command Prompt, the the Path environment variable is set to

C:\Users\bkhouri>set PATH
Path=C:\Python314\Scripts\;C:\Python314\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\Neovim\bin;C:\Program Files\Docker\Docker\resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\GitHub CLI\;C:\Program Files\PowerShell\7\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\bkhouri\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\bkhouri\AppData\Local\Programs\Python\Python310\;C:\Users\bkhouri\AppData\Local\Microsoft\WindowsApps;C:\Users\bkhouri\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\bkhouri\AppData\Local\Programs\Swift\Runtimes\6.2.3\usr\bin\;C:\Users\bkhouri\AppData\Local\Programs\Swift\Toolchains\6.2.3+Asserts\usr\bin\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW

Cmake is not available

C:\Users\bkhouri>where cmake.exe
INFO: Could not find files for the given pattern(s).

C:\Users\bkhouri>where Cmake.exe
INFO: Could not find files for the given pattern(s).

And when I try to build, I get errors that Cmake is not available


S:\>set CMAKE_BUILD_TYPE=Release

S:\>set REPO_SCHEME=main

S:\>set SKIP_UPDATE_CHECKOUT=True

S:\>.\swift\utils\build-windows-toolchain.bat
S:\>setlocal enableextensions enabledelayedexpansion

S:\>if "" == "" goto Start

S:\>if defined PYTHON_HOME path !Path!;!PYTHON_HOME:"=!

S:\>cd S:\swift\utils\\..\..

S:\>set SourceRoot=S:\

S:\>set BuildRoot=S:\\build

S:\>md S:\\build
A subdirectory or file S:\\build already exists.

S:\>subst T: /d

S:\>subst T: S:\\build   || (exit /b 1 )

S:\>set BuildRoot=T:

S:\>set PackageRoot=T:\artifacts

S:\>md T:\artifacts
A subdirectory or file T:\artifacts already exists.

S:\>md T:\tmp
A subdirectory or file T:\tmp already exists.

S:\>set TEMP=T:\tmp

S:\>set TMP=T:\tmp

S:\>set TMPDIR=T:\tmp

S:\>set NINJA_STATUS=[%f/%t][%p][%es]

S:\>set TestsList=lld,lldb,lldb-swift,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp

S:\>set "TestArg="

S:\>set "Skip=,,"

S:\>for %I in (lld lldb lldb-swift swift dispatch foundation xctest swift-format sourcekit-lsp) do (if "!Skip:,%I,=!" == "!Skip!" (set "TestArg=!TestArg!%I," ) )

S:\>(if "!Skip:,lld,=!" == "!Skip!" (set "TestArg=!TestArg!lld," ) )

S:\>(if "!Skip:,lldb,=!" == "!Skip!" (set "TestArg=!TestArg!lldb," ) )

S:\>(if "!Skip:,lldb-swift,=!" == "!Skip!" (set "TestArg=!TestArg!lldb-swift," ) )

S:\>(if "!Skip:,swift,=!" == "!Skip!" (set "TestArg=!TestArg!swift," ) )

S:\>(if "!Skip:,dispatch,=!" == "!Skip!" (set "TestArg=!TestArg!dispatch," ) )

S:\>(if "!Skip:,foundation,=!" == "!Skip!" (set "TestArg=!TestArg!foundation," ) )

S:\>(if "!Skip:,xctest,=!" == "!Skip!" (set "TestArg=!TestArg!xctest," ) )

S:\>(if "!Skip:,swift-format,=!" == "!Skip!" (set "TestArg=!TestArg!swift-format," ) )

S:\>(if "!Skip:,sourcekit-lsp,=!" == "!Skip!" (set "TestArg=!TestArg!sourcekit-lsp," ) )

S:\>set "TestArg=-Test !TestArg!"

S:\>set "PackagingArg=-SkipPackaging"

S:\>if not "" == "" set "PackagingArg=-Stage T:\artifacts"

S:\>set "WindowsSDKArgs=-Windows"

S:\>if "" == "" set "WindowsSDKArgs=-Windows -WindowsSDKLinkModes dynamic"

S:\>if not "" == "" set "WindowsSDKArgs=-Windows -WindowsSDKLinkModes dynamic -WindowsSDKArchitectures "

S:\>set "HostArchNameArg="

S:\>if not "" == "" set "HostArchNameArg=-HostArchName "

S:\>call :CloneRepositories   || (exit /b 1 )

S:\>setlocal enableextensions enabledelayedexpansion

S:\>if defined SKIP_UPDATE_CHECKOUT goto :eof

S:\>powershell.exe -ExecutionPolicy RemoteSigned -File S:\swift\utils\build.ps1      -SourceCache S:\   -BinaryCache T:   -ImageRoot T:   -Windows -WindowsSDKLinkModes dynamic   -SkipPackaging   -Test lld,lldb,lldb-swift,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp,   -IncludeSBoM   -Summary   || (exit /b 1 )
CMake not found on Path nor in the Visual Studio Installation. Please Install CMake to continue.
At S:\swift\utils\build.ps1:555 char:3
+   throw "CMake not found on Path nor in the Visual Studio Installatio ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (CMake not found...ke to continue.:String) [], RuntimeException
    + FullyQualifiedErrorId : CMake not found on Path nor in the Visual Studio Installation. Please Install CMake to continue.

What am I doing wrong here?