I assume I build the c files with gcc and the c++ with g++?
Correct - but the Makefiles (as generated by CMake) should take care of all that normally. I suppose you can't use my shell scripts out of the box, but CMake, GNU make etc should work fine on most platforms.