CMakeLists enhancements

 - compiler detection (clang and gcc version check)
 - compile flags only for src/ subdir
 - system and local include paths
 - fix for clang compilation