mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(build): surpress spurious warnings from gcc in -E preprocessor mode
Since #29315 we are also preprocessing header files in order to find functions which need prototype declarations. gcc emits a spurious "warning: #pragma once in main file" even when when you are just using `gcc -E` which causes a bit of noise in compiler output. As a workaround, surpress all warnings for this step, this should be pretty much harmless as we will still get preprocessor warnings when doing actual compilation `gcc -c` later. reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89808
This commit is contained in:
@ -563,7 +563,7 @@ foreach(sfile ${NVIM_SOURCES}
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(PREPROC_OUTPUT /P /Fi${gf_i} /nologo)
|
set(PREPROC_OUTPUT /P /Fi${gf_i} /nologo)
|
||||||
else()
|
else()
|
||||||
set(PREPROC_OUTPUT -E -o ${gf_i})
|
set(PREPROC_OUTPUT -w -E -o ${gf_i})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(depends "${HEADER_GENERATOR}" "${sfile}" "${LUA_GEN_DEPS}")
|
set(depends "${HEADER_GENERATOR}" "${sfile}" "${LUA_GEN_DEPS}")
|
||||||
|
Reference in New Issue
Block a user