CMake: Download Commonmark and Wasm spec tests using download_file()

This makes sure we have no bare file(DOWNLOAD) calls in the build
This commit is contained in:
Andrew Kaster 2023-08-10 15:45:19 -06:00 committed by Andrew Kaster
parent 92214b59ab
commit b046940679
Notes: sideshowbarker 2024-07-17 06:45:52 +09:00
2 changed files with 2 additions and 5 deletions

View file

@ -4,6 +4,6 @@ set(MARKDOWN_TEST_PATH ${CMAKE_BINARY_DIR}/commonmark.spec.json)
set(MARKDOWN_TEST_URL https://spec.commonmark.org/0.30/spec.json)
if(ENABLE_COMMONMARK_SPEC_DOWNLOAD)
file(DOWNLOAD ${MARKDOWN_TEST_URL} ${MARKDOWN_TEST_PATH})
download_file(${MARKDOWN_TEST_URL} ${MARKDOWN_TEST_PATH})
install(FILES ${MARKDOWN_TEST_PATH} DESTINATION home/anon/Tests)
endif()

View file

@ -7,10 +7,7 @@ if(INCLUDE_WASM_SPEC_TESTS)
set(WASM_SPEC_TEST_GZ_PATH ${CMAKE_BINARY_DIR}/wasm-spec-testsuite.tar.gz CACHE PATH "")
set(WASM_SPEC_TEST_PATH ${CMAKE_CURRENT_BINARY_DIR}/Tests/Fixtures/SpecTests CACHE PATH "")
if(NOT EXISTS ${WASM_SPEC_TEST_GZ_PATH})
message(STATUS "Downloading the WebAssembly testsuite from ${WASM_SPEC_TEST_GZ_URL}...")
file(DOWNLOAD ${WASM_SPEC_TEST_GZ_URL} ${WASM_SPEC_TEST_GZ_PATH} INACTIVITY_TIMEOUT 10)
endif()
download_file(${WASM_SPEC_TEST_GZ_URL} ${WASM_SPEC_TEST_GZ_PATH})
set(SKIP_PRETTIER false)
if (WASM_SPEC_TEST_SKIP_FORMATTING)