when I compile libevent using cmake, I found some confusing code as follow:
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR
("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang"))
set(CLANG 1)
endif()
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR (${CLANG}))
set(GNUC 1)
endif()
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") OR (${CLANG}))
set(MSVC 1)
endif()
I'm really confused about where CMAKE_C_COMPILER_ID get the value, when I print CMAKE_C_COMPILER_ID under centos, it says "GNU" CMAKE_C_COMPILER_ID
could someone give me a help?