I'm running the Ubuntu version of Windows Subsystem for Linux. In there I've set up a simple cmake project and created a script to save me from typing out
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../
every time I want to build. My CMakeLists.txt exists in two directories above (thus
../../). The build works fine if I type the command above manually OR run a powershell script with the exact same command and nothing else.
But running this bash script inside WSL
#!/bin/bash cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../
I receive the error
" does not exist.source directory "/mnt/c/dev-files/C/Practice/.
It looks like the bash script messes up the error output of cmake, so I'm guessing the script is executing cmake or passing the arguments incorrectly but I have no idea why.