Thank you JetBrains for creating CLion. I think it's great! The only thing I dislike at this point is building my projects in CLion. I have not used Cmake before, and it seems overly complicated when you just want to build a simple project. For the project that I've created, I can build the project simply using a single line for g++, which is:
g++ main.cpp -I/usr/include/postgresql/ -L/usr/lib/postgresql/9.3/lib/ -lpq -o main
Unfortunately with CLion, as far as I can tell, I'm required to use cmake to build and debug my project. After spending a considerable amount of time searching the web, and trying different things, I cannot build this simple project with cmake. I honestly don't want to have to relearn another way to build and debug my project or waste a lot of time figuring out how to build the project when I am only interested in programming C++. Is there a simple way for me to build my project and move on to writing C++ code without having to learn cmake?
I have also attempted using "FindPostgreSQL.cmake" that is located in clion-140.2310.6/bin/cmake/share/cmake-3.1/Modules$, and it will not find my PostgreSQL installation. I've tried a lot of other combinations to try to tell cmake the include path and the library where to find the information needed to build my project, and without success.
Attached is my project and my final attempts to get cmake to work. Can someone help me resolve this building problem? Alternatives to cmake are welcome... :)
Update: I am using Debian Wheezy as my operating system. I believe the rest of the information needed is included in the project file.