Skip to content

Commit 3e4bd05

Browse files
committed
Disable ICC compiler warnings
1 parent 7625a37 commit 3e4bd05

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,17 @@ 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+
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)