mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-09 18:40:22 +00:00
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:
parent
3b5eb7ca90
commit
a329bdd607
@ -53,12 +53,12 @@ set(LWIP_COMPILER_FLAGS_GNU_CLANG
|
|||||||
-Wshadow
|
-Wshadow
|
||||||
-Wpointer-arith
|
-Wpointer-arith
|
||||||
-Wcast-qual
|
-Wcast-qual
|
||||||
-Wc++-compat
|
$<$<COMPILE_LANGUAGE:C>:-Wc++-compat>
|
||||||
-Wwrite-strings
|
-Wwrite-strings
|
||||||
-Wold-style-definition
|
$<$<COMPILE_LANGUAGE:C>:-Wold-style-definition>
|
||||||
-Wcast-align
|
-Wcast-align
|
||||||
-Wmissing-prototypes
|
$<$<COMPILE_LANGUAGE:C>:-Wmissing-prototypes>
|
||||||
-Wnested-externs
|
$<$<COMPILE_LANGUAGE:C>:-Wnested-externs>
|
||||||
-Wunreachable-code
|
-Wunreachable-code
|
||||||
-Wuninitialized
|
-Wuninitialized
|
||||||
-Wmissing-prototypes
|
-Wmissing-prototypes
|
||||||
@ -80,7 +80,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|||||||
|
|
||||||
if (NOT LWIP_HAVE_MBEDTLS)
|
if (NOT LWIP_HAVE_MBEDTLS)
|
||||||
list(APPEND LWIP_COMPILER_FLAGS_GNU_CLANG
|
list(APPEND LWIP_COMPILER_FLAGS_GNU_CLANG
|
||||||
-Wc90-c99-compat
|
$<$<COMPILE_LANGUAGE:C>:-Wc90-c99-compat>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user