mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Detect support for and use -Wimplicit-fallthrough
This commit is contained in:
parent
0ff959329b
commit
b43a3dbff8
@ -221,6 +221,11 @@ else()
|
|||||||
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
|
||||||
-Wstrict-prototypes -std=gnu99)
|
-Wstrict-prototypes -std=gnu99)
|
||||||
|
|
||||||
|
check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||||
|
if(HAS_WIMPLICIT_FALLTHROUGH_FLAG)
|
||||||
|
add_definitions(-Wimplicit-fallthrough)
|
||||||
|
endif()
|
||||||
|
|
||||||
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
|
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
|
||||||
# 3.4.1 used there.
|
# 3.4.1 used there.
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
|
Loading…
Reference in New Issue
Block a user