mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
build: bundle uncrustify
Uncrustify is sensitive to version changes, which causes friction for contributors that doesn't have that exact version. It's also simpler to download and install the correct version than to have bespoke version checking.
This commit is contained in:
@@ -888,18 +888,13 @@ add_glob_target(
|
||||
EXCLUDE
|
||||
tui/terminfo_defs.h)
|
||||
|
||||
add_custom_target(uncrustify-version
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-D UNCRUSTIFY_PRG=${UNCRUSTIFY_PRG}
|
||||
-D CONFIG_FILE=${PROJECT_SOURCE_DIR}/src/uncrustify.cfg
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/CheckUncrustifyVersion.cmake)
|
||||
|
||||
set(UNCRUSTIFY_PRG ${DEPS_BIN_DIR}/uncrustify)
|
||||
add_glob_target(
|
||||
TARGET lintc-uncrustify
|
||||
COMMAND ${UNCRUSTIFY_PRG}
|
||||
FLAGS -c "${PROJECT_SOURCE_DIR}/src/uncrustify.cfg" -q --check
|
||||
FILES ${LINT_NVIM_SOURCES})
|
||||
add_dependencies(lintc-uncrustify uncrustify-version)
|
||||
add_dependencies(lintc-uncrustify uncrustify)
|
||||
|
||||
add_custom_target(lintc)
|
||||
add_dependencies(lintc lintc-clint lintc-uncrustify)
|
||||
@@ -910,7 +905,7 @@ add_custom_target(formatc
|
||||
-D LANG=c
|
||||
-P ${PROJECT_SOURCE_DIR}/cmake/Format.cmake
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||
add_dependencies(formatc uncrustify-version)
|
||||
add_dependencies(formatc uncrustify)
|
||||
|
||||
add_custom_target(generated-sources DEPENDS
|
||||
${NVIM_GENERATED_FOR_SOURCES}
|
||||
|
Reference in New Issue
Block a user