Windows compilation: sh.exe in path
If MSYS is installed and also Code::blocks with Mingw, CMake refused to generate a Mingw Makefile, because ""sh.exe found in PATH"". This is a known issue : https://www.mail-archive.com/cmake@cmake.org/msg41075.html
Unfortunately, long story short, there is no nice solution. When gnu make finds sh.exe in the PATH it will process its arguments in a different way as when no sh.exe is found. This means that the Makefile syntax changes according to sh.exe found in PATH or not. The only solution is to rename sh.exe into something else. Or fix MSYS so it can properly compile a test program for CMake.