Skip to content

Commit 56d2559

Browse files
committed
Disable ICC compiler warnings
1 parent 7625a37 commit 56d2559

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,16 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
281281
endif()
282282

283283
elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel")
284-
message(STATUS "Setting Intel C compiler options")
284+
message(STATUS "Setting Intel C (ICC) compiler options")
285285
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall -Wextra")
286+
# warning #169: expected a declaration
287+
# Fallthrough attribute does not like semicolon.
288+
# this is fixed in Intel ICC 2021.5.0, but we only have 2021.4.0 in current CI build.
289+
# warning #279: controlling expression is constant
290+
# We have these everywhere in flatcc generated code.
291+
# warning #188: enumerated type mixed with another type
292+
# This is not very noisy, but still annoying, e.g. when zeroing an enum.
293+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd169 -wd279 -wd188")
286294
elseif (MSVC) # using STREQUAL here conflicts with string interpretation changes in CMake
287295
message(STATUS "Setting MSVC C compiler options")
288296
# -DFLATCC_PORTABLE also required, but set earlier

0 commit comments

Comments
 (0)