Git Bash on Windows - CMake Error: The source directory does not exists

Viewed 1580

I use Git Bash on Windows 10. When I run the following command from the TestCpp directory:

cmake -S . -B build -G "Visual Studio 15 2017" -A "Win32"

I get the following error:

CMake Error: The source directory "C:/Projects/TestCpp/build" does not exist.

When I create a build folder and then run the command from that folder:

cmake -G "Visual Studio 15 2017" -A "Win32" .. 

everything works fine. Why the first command doesn't work ?

1 Answers

The behavior described exists when trying to use the -S and -B options with an older version of CMake that does not support them. Support for these options is documented as starting in 3.13.

Related