If you have time, can you check CMake version? https://github.com/stalkerg/postgres_cmake
During Mingw installation you can choose a version, it can be more MSVC like or more Unix, probably Postgres have a problem with one of mingw type. So I unpacked the source tarball within the shell itself(using gunzip and > tar), and I could fix many errors. > This is really stange, mingw on windows should't depend on any attribute.