MSVC: Fix declaration generation. #3301

This commit is contained in:
Rui Abreu Ferreira 2014-06-21 16:54:38 +01:00 committed by Justin M. Keyes
parent bb46cc2c9c
commit 5230aa8de9

View File

@ -141,9 +141,16 @@ foreach(sfile ${NEOVIM_SOURCES}
set(gf1 "${GENERATED_DIR}/${r}.c.generated.h")
set(gf2 "${GENERATED_INCLUDES_DIR}/${r}.h.generated.h")
set(gf3 "${GENERATED_DIR}/${r}.i")
if(MSVC)
set(PREPROC_OUTPUT /P /Fi${gf3})
else()
set(PREPROC_OUTPUT -E -o ${gf3})
endif()
add_custom_command(
OUTPUT "${gf1}" "${gf2}"
COMMAND ${CMAKE_C_COMPILER} ${sfile} -o ${gf3} ${gen_cflags} -E ${C_FLAGS_ARRAY}
COMMAND ${CMAKE_C_COMPILER} ${sfile} ${PREPROC_OUTPUT} ${gen_cflags} ${C_FLAGS_ARRAY}
COMMAND "${LUA_PRG}" "${HEADER_GENERATOR}" "${sfile}" "${gf1}" "${gf2}" "${gf3}"
DEPENDS "${HEADER_GENERATOR}" "${sfile}"
)