Meta: Download WASM spec tests using CMake

If we have a new CMake version - download the files using CMake
API, instead of external tools.
This commit is contained in:
Diego Iastrubni 2022-09-02 21:54:24 +03:00 committed by Sam Atkins
parent 629c77440b
commit b66ceafaba
Notes: sideshowbarker 2024-07-17 07:19:57 +09:00

View file

@ -21,7 +21,11 @@ if(INCLUDE_WASM_SPEC_TESTS)
if(EXISTS ${WASM_SPEC_TEST_GZ_PATH} AND NOT EXISTS ${WASM_SPEC_TEST_PATH})
message(STATUS "Extracting the WebAssembly testsuite from ${WASM_SPEC_TEST_GZ_PATH}...")
file(MAKE_DIRECTORY ${WASM_SPEC_TEST_PATH})
if (CMAKE_VERSION VERSION_LESS 3.18.0)
execute_process(COMMAND "${TAR_TOOL}" -xzf ${WASM_SPEC_TEST_GZ_PATH})
else()
file(ARCHIVE_EXTRACT INPUT ${WASM_SPEC_TEST_GZ_PATH} )
endif()
file(GLOB WASM_TESTS "${CMAKE_BINARY_DIR}/testsuite-main/*.wast")
foreach(PATH ${WASM_TESTS})
get_filename_component(NAME ${PATH} NAME_WLE)