Skip to content

Commit 41362e6

Browse files
committed
cmake: Disable -Wno-misleading-indentation with clang-10 onwards
clang also introduced this warning now Signed-off-by: Khem Raj <[email protected]>
1 parent cce8be3 commit 41362e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_
9999
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
100100
endif ()
101101

102+
# clang-10 added -Wmisleading-indentation as well, skip it too
103+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9")
104+
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
105+
endif ()
106+
102107
# Warnings as errors?
103108
if (WERROR)
104109
list (APPEND C_CXX_WARNING_FLAGS -Werror)

0 commit comments

Comments
 (0)