abstract the flymake setup and add the syntax check for c++