Refactoring detect compiler CMake. #2347

- Fix chrpath with apple.
- Refactoring detect compiler GCC / Clang / Intel C++ / Visual Studio
C++