News about CMake: I built postgres, initdb, createdb, psql, pg_ctl using CMake. After make install you can run initdb after run postgres after createdb and use it by psql. Only for Linux now and realy bugy (and the code is very dirt) but it work! If someone wants to test or to help: https://github.com/stalkerg/postgres_cmake
PS All define for pg_config.h generate and testing truly
Thanks for sharing the progress! That's really something that would pay long-term. --