CMakeLists file. to respect different build types.
Removed various compiler warnings.