cmake: add "generated-sources" target

This is intended to be used with source introspection tools like
clangd, where it would useful to regenerate headers and source files,
which introspection results depend on, without making a full
rebuild which takes much longer time than just generating headers.
This commit is contained in:
Björn Linse 2018-09-06 11:11:59 +02:00
parent 5de6f97408
commit 9e8f9dd5d4
2 changed files with 9 additions and 0 deletions

View File

@ -142,6 +142,9 @@ clint-full: build/.ran-cmake
check-single-includes: build/.ran-cmake
+$(BUILD_CMD) -C build check-single-includes
generated-sources: build/.ran-cmake
+$(BUILD_CMD) -C build generated-sources
appimage:
bash scripts/genappimage.sh

View File

@ -660,4 +660,10 @@ add_custom_target(
DEPENDS ${LINT_PRG} ${LINT_NVIM_SOURCES} ${LINT_SUPPRESS_FILE}
)
add_custom_target(generated-sources DEPENDS
${NVIM_GENERATED_FOR_SOURCES}
${NVIM_GENERATED_FOR_HEADERS}
${NVIM_GENERATED_SOURCES}
)
add_subdirectory(po)