Use CMAKE_CXX_COMPILER_ID.