improved cmake files to support several compilers (with limitations), also added a configuration file instead of passing options to cmake command line