If I however set the PATH, then it works fine: set PATH=c:\msys64\mingw32\bin c:\msys64\usr\local\bin c:\msys64\usr\bin c:\msys64\bin c:\Windows\System32 c:\Windows c:\Windows\System32\Wbem c:\Windows\System32\WindowsPowerShell\v1.0\ c:\msys64\usr\bin\site_perl c:\msys64\usr\bin\vendor_perl c:\msys64\usr\bin\core_perl cmake -G "MSYS Makefiles". See also "C:/msys64/home/me/go/build/CMakeFiles/CMakeError.log". Call Stack (most recent call first): CMakeLists.txt:3 (project) - Configuring incomplete, errors occurred! See also "C:/msys64/home/me/go/build/CMakeFiles/CMakeOutput.log".
They only differ by name, and this is to suit everyone needing a particular convention: make.exe: traditional name for GNU Make on popular linux distributions. It contains 32 and 64-bit executables and has three identical files for each. It fails with the following output: Change Dir: C:/msys64/home/me/go/build/CMakeFiles/CMakeTmp Run Build Command:"C:/msys64/mingw32/bin/mingw32-make.exe" "cmTC_cb003/fast" C:/msys64/mingw32/bin/mingw32-make.exe -f CMakeFiles\cmTC_cb003.dir\build.make CMakeFiles/cmTC_cb003.dir/build mingw32-make.exe: Entering directory 'C:/msys64/home/me/go/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_cb003.dir/testCCompiler.c.obj C:\msys64\mingw32\bin\gcc.exe -o CMakeFiles\cmTC_cb003.dir\testCCompiler.c.obj -c C:\msys64\home\me\go\build\CMakeFiles\CMakeTmp\testCCompiler.c mingw32-make.exe: *** Error 1 mingw32-make.exe: Leaving directory 'C:/msys64/home/me/go/build/CMakeFiles/CMakeTmp' mingw32-make.exe: *** Error 2 CMake will not be able to correctly generate this project. This is a binary package for GNU Make, patched for use with mingw-w64/w32.
Results in this error message - The C compiler identification is unknown - The CXX compiler identification is unknown - Check for working C compiler: C:/msys64/mingw32/bin/gcc.exe - Check for working C compiler: C:/msys64/mingw32/bin/gcc.exe - broken CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "C:/msys64/mingw32/bin/gcc.exe" is not able to compile a simple test program.
Under cmd.exe, the following command cmake -G "MinGW Makefiles" -D "CMAKE_MAKE_PROGRAM=C:/msys64/mingw32/bin/mingw32-make.exe".