Fix bug #55964: CMake's LWIP_COMPILER_FLAGS should be split for C and C++

CMakeCommon.cmake: Use conditional for flags that only make sense for C code
This commit is contained in:
Dirk Ziegelmeier 2019-03-20 11:20:35 +01:00
parent 3b5eb7ca90
commit a329bdd607

View File

@ -53,12 +53,12 @@ set(LWIP_COMPILER_FLAGS_GNU_CLANG
-Wshadow
-Wpointer-arith
-Wcast-qual
-Wc++-compat
$<$<COMPILE_LANGUAGE:C>:-Wc++-compat>
-Wwrite-strings
-Wold-style-definition
$<$<COMPILE_LANGUAGE:C>:-Wold-style-definition>
-Wcast-align
-Wmissing-prototypes
-Wnested-externs
$<$<COMPILE_LANGUAGE:C>:-Wmissing-prototypes>
$<$<COMPILE_LANGUAGE:C>:-Wnested-externs>
-Wunreachable-code
-Wuninitialized
-Wmissing-prototypes
@ -80,7 +80,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if (NOT LWIP_HAVE_MBEDTLS)
list(APPEND LWIP_COMPILER_FLAGS_GNU_CLANG
-Wc90-c99-compat
$<$<COMPILE_LANGUAGE:C>:-Wc90-c99-compat>
)
endif()