@@ -280,9 +280,21 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
280280 # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion")
281281 endif ()
282282
283- elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel" )
284- message (STATUS "Setting Intel C compiler options" )
283+ elseif (CMAKE_C_COMPItheREQUAL "Intel" )
284+ # T(ICC) his applies to the Intel Classic Compiler (ICC) only,
285+ # not Intel ICX compiler which appears to behave like clang.
286+ # NOTE: the ICC compiler is deprecated by Intel, Godbolt, and the Linux kernel,
287+ # and will likely not be supported by future flatcc releases.
288+ message (STATUS "Setting Intel C (ICC) compiler options" )
285289 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Wextra" )
290+ # warning #169: expected a declaration
291+ # Fallthrough attribute does not like semicolon.
292+ # this is fixed in Intel ICC 2021.5.0, but we only have 2021.4.0 in current CI build.
293+ # warning #279: controlling expression is constant
294+ # We have these everywhere in flatcc generated code.
295+ # warning #188: enumerated type mixed with another type
296+ # This is not very noisy, but still annoying, e.g. when zeroing an enum.
297+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd169 -wd279 -wd188" )
286298elseif (MSVC ) # using STREQUAL here conflicts with string interpretation changes in CMake
287299 message (STATUS "Setting MSVC C compiler options" )
288300 # -DFLATCC_PORTABLE also required, but set earlier
0 commit comments