2) CLion asks if it should open CMakeLists.txt -> yes
3) Wait a bit
4) That's it
It results in quite good IDE support for PostgreSQL code: jump to definition, find references, great autocomplete, parameter hints (including the ones for macros), refactoring (e.g. function rename with update of the references).
It imports run/debug configurations from CMake as well, so one can run and debug tests/binaries right after project import.