mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
ci: introduce CI_LINT option
This will abort if lint programs are not found, and is meant primarily for the lint job in CI. Supersedes the REQUIRED argument in add_glob_target as it's a superior replacement by being a built-in solution.
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
# depends on the value of TOUCH_STRATEGY.
|
||||
#
|
||||
# Options:
|
||||
# REQUIRED - Abort if COMMAND doesn't exist.
|
||||
#
|
||||
# Single value arguments:
|
||||
# TARGET - Name of the target
|
||||
@ -53,7 +52,7 @@
|
||||
# files.
|
||||
function(add_glob_target)
|
||||
cmake_parse_arguments(ARG
|
||||
"REQUIRED"
|
||||
""
|
||||
"TARGET;COMMAND;GLOB_PAT;TOUCH_STRATEGY"
|
||||
"FLAGS;FILES;GLOB_DIRS;EXCLUDE"
|
||||
${ARGN}
|
||||
@ -61,14 +60,8 @@ function(add_glob_target)
|
||||
|
||||
if(NOT ARG_COMMAND)
|
||||
add_custom_target(${ARG_TARGET})
|
||||
if(ARG_REQUIRED)
|
||||
add_custom_command(TARGET ${ARG_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET}: ${ARG_COMMAND} not found"
|
||||
COMMAND false)
|
||||
else()
|
||||
add_custom_command(TARGET ${ARG_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET} SKIP: ${ARG_COMMAND} not found")
|
||||
endif()
|
||||
add_custom_command(TARGET ${ARG_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "${ARG_TARGET} SKIP: ${ARG_COMMAND} not found")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user