aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-12 22:42:44 +0200
committerGitHub <noreply@github.com>2019-07-12 22:42:44 +0200
commite682d799fa3cf2e80a02d00c6ea874599d58f0e7 (patch)
treedabbd64aed10f3da7439d2e32dd7b69596b7ff76 /src
parentec66d2eecd544f764ff73a3f4aa472f188d2fea6 (diff)
downloadrneovim-e682d799fa3cf2e80a02d00c6ea874599d58f0e7.tar.gz
rneovim-e682d799fa3cf2e80a02d00c6ea874599d58f0e7.tar.bz2
rneovim-e682d799fa3cf2e80a02d00c6ea874599d58f0e7.zip
build: fix check_c_compiler_flag for -Wno-… (#10483)
`check_c_compiler_flag(-Wno-doesnotexist …)` is successful always, apparently for all "no-" prefixes. Therefore check for the flag itself (without "no-" prefix). I am seeing a warning if the source fails to compile: > cc1: warning: unrecognized command line option ‘-Wno-meh’ Which is turned into an error with `-Werror`: > cc1: error: unrecognized command line option ‘-Wno-meh’ [-Werror] But when it compiles successfully, there is no warning/error. gcc (GCC) 9.1.0.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 7807125b92..95ca1052af 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -164,8 +164,8 @@ 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.
- check_c_compiler_flag(-Wno-static-in-inline HAS_WNO_STATIC_IN_INLINE_FLAG)
- if(HAS_WNO_STATIC_IN_INLINE_FLAG)
+ check_c_compiler_flag(-Wstatic-in-inline HAS_WSTATIC_IN_INLINE)
+ if(HAS_WSTATIC_IN_INLINE)
set_source_files_properties(
eval.c PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-static-in-inline -Wno-conversion")
else()