build: FreeBSD: Disable -Wc11-extensions only for clang

From FreeBSD ports patch:
https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-CMakeLists.txt?revision=425833&view=markup

References #4363
This commit is contained in:
Justin M. Keyes 2017-05-21 13:44:02 +02:00
parent 9cc10c69f2
commit 6255c4e053

View File

@ -228,7 +228,7 @@ else()
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
# 3.4.1 used there.
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
add_definitions(-Wno-c11-extensions)
endif()
endif()