CMake on powershell does not support -S . -B build -DCMAKE_TOOLCHAIN_FILE=...
Running cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=cmake/watcom-DOS.cmake
fails on powershell with the error:
CMake Error: The source directory "C:/Users/maarten/source/repos/watcom-cmake/.cmake" does not exist. Specify --help for usage, or press the help button on the CMake GUI.
Adding -G "Watcom WMake"
does not resolve the issue.
Using cmd.exe
works fine.
Using a plain cmake-S . -B build
works, but then it uses the Visual Studio toolchain.
I encountered this issue on github actions. See https://github.com/madebr/watcom-cmake/runs/5077477345