diff options
author | Rui Abreu Ferreira <rap-ep@gmx.com> | 2016-09-10 12:23:58 +0100 |
---|---|---|
committer | Rui Abreu Ferreira <raf-ep@gmx.com> | 2016-09-10 18:43:04 +0100 |
commit | aa6705875d403734fa441bb455357925eb94386b (patch) | |
tree | 3b7350a4fde0b30e6da9cedca441fb0ee872eb93 /src | |
parent | 4c9e5676cd8aa3798452e283dc3927fea76c901c (diff) | |
download | rneovim-aa6705875d403734fa441bb455357925eb94386b.tar.gz rneovim-aa6705875d403734fa441bb455357925eb94386b.tar.bz2 rneovim-aa6705875d403734fa441bb455357925eb94386b.zip |
Add compiler check for -Wno-static-in-inline
Add compiler check for -Wno-static-in-inline, the option is only
supported in gcc >= 4.4, and some systems still ship with earlier
versions of gcc (see #5300).
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 3ae75c01c3..e2de2530d6 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -120,9 +120,14 @@ if(NOT MSVC) set_source_files_properties( ${CONV_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion") # gperf generates ANSI-C with incorrect linkage, ignore it. - set_source_files_properties( - eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-static-in-inline -Wno-conversion") - + check_c_compiler_flag(-Wno-static-in-inline HAS_WNO_STATIC_IN_INLINE_FLAG) + if(HAS_WNO_STATIC_IN_INLINE_FLAG) + set_source_files_properties( + eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-static-in-inline -Wno-conversion") + else() + set_source_files_properties( + eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion") + endif() endif() if(DEFINED MIN_LOG_LEVEL) |