diff options
author | ZyX <kp-pav@yandex.ru> | 2017-03-31 12:02:59 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-31 16:04:18 +0300 |
commit | c61858a9978504c645f09de60daf4f9786c2220e (patch) | |
tree | 1086c01fb178801836ddfb0a63b15f410070da30 /src | |
parent | 24fd125893203c667789cb574b289fc1c9eaf6bc (diff) | |
download | rneovim-c61858a9978504c645f09de60daf4f9786c2220e.tar.gz rneovim-c61858a9978504c645f09de60daf4f9786c2220e.tar.bz2 rneovim-c61858a9978504c645f09de60daf4f9786c2220e.zip |
cmake: Replace RunLint.cmake with code in src/nvim/CMakeLists.txt
This also removes LINT_FILE environment variable, other then that functionality
is kept. It is expected that developers needing partial linting will use `make
lint`, touching interesting file before (if not done already by writing to
them).
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index f5f4173879..b19bdf2326 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -505,21 +505,32 @@ endfunction() add_download(${LINT_SUPPRESS_FILE} ${LINT_SUPPRESS_URL} off) +set(LINT_NVIM_REL_SOURCES) foreach(sfile ${LINT_NVIM_SOURCES}) get_test_target("" "${sfile}" r suffix) set(suppress_file ${LINT_SUPPRESSES_ROOT}/${suffix}.json) set(suppress_url "${LINT_SUPPRESS_URL_BASE}/${suffix}.json") + set(rsfile src/nvim/${r}) add_download(${suppress_file} ${suppress_url} on) set(touch_file "${TOUCHES_DIR}/ran-clint-${suffix}") add_custom_command( OUTPUT ${touch_file} - COMMAND ${LINT_PRG} --suppress-errors=${suppress_file} src/nvim/${r} + COMMAND ${LINT_PRG} --suppress-errors=${suppress_file} ${rsfile} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${CMAKE_COMMAND} -E touch ${touch_file} DEPENDS ${sfile} ${suppress_file} ) list(APPEND LINT_TARGETS ${touch_file}) + list(APPEND LINT_NVIM_REL_SOURCES ${rsfile}) endforeach() add_custom_target(clint DEPENDS ${LINT_TARGETS}) +add_custom_target( + clint-full + COMMAND + ${LINT_PRG} --suppress-errors=${LINT_SUPPRESS_FILE} ${LINT_NVIM_REL_SOURCES} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + DEPENDS ${LINT_NVIM_SOURCES} ${LINT_SUPPRESS_FILE} +) + add_subdirectory(po) |