Describe the bug
This is because the underlying cmake command is invoked without a -G generator argument, causing CMake to default to "NMake Makefiles" on Windows.
Regression
Steps to reproduce
- On a Windows machine with ninja installed but without Visual Studio build tools (nmake) in the PATH.
- follow the steps for install zephyr on windows in https://docs.zephyrproject.org/latest/develop/getting_started/index.html until Run west zephyr-export.
Relevant log output
FATAL ERROR: command exited with status 1: '.../cmake.EXE' -S '...' -B '...'
CMake Error at CMakeLists.txt:12 (project):
Running
'nmake' '-?'
failed with:
no such file or directory
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
OS: Windows
Toolchain: Zephyr SDK, CMake, Ninja
Additional Context
Using a PowerShell command line in a format similar to the one below:
& 'C:\Program Files\CMake\bin\cmake.EXE' -S '\zephyrproject\zephyr\share\zephyr-packge\cmake' -B '\zephyrproject\zephyr\share\zephyr-packge\cmake' -G Ninja
to replace
west zephyr-export
allows this step to be successfully completed in this installation.