cmake: Disable -Wno-misleading-indentation with clang-10 onwards

clang also introduced this warning now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2019-12-30 13:33:39 -08:00
parent cce8be3966
commit 41362e6b6f

View File

@ -99,6 +99,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
endif ()
# clang-10 added -Wmisleading-indentation as well, skip it too
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9")
list (APPEND C_CXX_WARNING_FLAGS -Wno-misleading-indentation)
endif ()
# Warnings as errors?
if (WERROR)
list (APPEND C_CXX_WARNING_FLAGS -Werror)