mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
cmake: Allow failing to download small suppress files
This commit is contained in:
parent
8204eaea7f
commit
24fd125893
@ -8,9 +8,11 @@ list(GET status 0 status_code)
|
|||||||
list(GET status 1 status_string)
|
list(GET status 1 status_string)
|
||||||
|
|
||||||
if(NOT status_code EQUAL 0)
|
if(NOT status_code EQUAL 0)
|
||||||
message(FATAL_ERROR "error: downloading '${URL}' failed
|
if(NOT ALLOW_FAILURE)
|
||||||
status_code: ${status_code}
|
message(FATAL_ERROR "error: downloading '${URL}' failed
|
||||||
status_string: ${status_string}
|
status_code: ${status_code}
|
||||||
log: ${log}
|
status_string: ${status_string}
|
||||||
")
|
log: ${log}
|
||||||
|
")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -491,21 +491,25 @@ foreach(hfile ${NVIM_HEADERS})
|
|||||||
endforeach()
|
endforeach()
|
||||||
add_custom_target(check-single-includes DEPENDS ${HEADER_CHECK_TARGETS})
|
add_custom_target(check-single-includes DEPENDS ${HEADER_CHECK_TARGETS})
|
||||||
|
|
||||||
function(add_download output url)
|
function(add_download output url allow_failure)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${output}"
|
OUTPUT "${output}"
|
||||||
COMMAND ${CMAKE_COMMAND} -DURL=${url} -DFILE=${output} -P ${DOWNLOAD_SCRIPT}
|
COMMAND
|
||||||
|
${CMAKE_COMMAND}
|
||||||
|
-DURL=${url} -DFILE=${output}
|
||||||
|
-DALLOW_FAILURE=${allow_failure}
|
||||||
|
-P ${DOWNLOAD_SCRIPT}
|
||||||
DEPENDS ${DOWNLOAD_SCRIPT}
|
DEPENDS ${DOWNLOAD_SCRIPT}
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_download(${LINT_SUPPRESS_FILE} ${LINT_SUPPRESS_URL})
|
add_download(${LINT_SUPPRESS_FILE} ${LINT_SUPPRESS_URL} off)
|
||||||
|
|
||||||
foreach(sfile ${LINT_NVIM_SOURCES})
|
foreach(sfile ${LINT_NVIM_SOURCES})
|
||||||
get_test_target("" "${sfile}" r suffix)
|
get_test_target("" "${sfile}" r suffix)
|
||||||
set(suppress_file ${LINT_SUPPRESSES_ROOT}/${suffix}.json)
|
set(suppress_file ${LINT_SUPPRESSES_ROOT}/${suffix}.json)
|
||||||
set(suppress_url "${LINT_SUPPRESS_URL_BASE}/${suffix}.json")
|
set(suppress_url "${LINT_SUPPRESS_URL_BASE}/${suffix}.json")
|
||||||
add_download(${suppress_file} ${suppress_url})
|
add_download(${suppress_file} ${suppress_url} on)
|
||||||
set(touch_file "${TOUCHES_DIR}/ran-clint-${suffix}")
|
set(touch_file "${TOUCHES_DIR}/ran-clint-${suffix}")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${touch_file}
|
OUTPUT ${touch_file}
|
||||||
|
Loading…
Reference in New Issue
Block a user