From 393095c1c69de922530871f74869433327b247b6 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Thu, 11 Feb 2021 18:37:41 +0100 Subject: [PATCH] cmake: Remove duplicate compile flags argument (#13920) ${C_FLAGS_ARRAY} is already part of ${gen_cflags} and does not need to be passed explicitly. Passing it a second time leads to macro redefinition warnings when -D_FORTIFY_SOURCE=2 is given as part of CFLAGS because Neovim enforces -D_FORTIFY_SOURCE=1. --- src/nvim/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index db77931c16..1a1a178620 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -284,7 +284,7 @@ foreach(sfile ${NVIM_SOURCES} endif() add_custom_command( OUTPUT "${gf_c_h}" "${gf_h_h}" - COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags} ${C_FLAGS_ARRAY} + COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags} COMMAND "${LUA_PRG}" "${HEADER_GENERATOR}" "${sfile}" "${gf_c_h}" "${gf_h_h}" "${gf_i}" DEPENDS ${depends}) list(APPEND NVIM_GENERATED_FOR_SOURCES "${gf_c_h}")