From b66ceafabaa174e77c3285ce4288ee1759a4a8fe Mon Sep 17 00:00:00 2001 From: Diego Iastrubni Date: Fri, 2 Sep 2022 21:54:24 +0300 Subject: [PATCH] Meta: Download WASM spec tests using CMake If we have a new CMake version - download the files using CMake API, instead of external tools. --- Meta/CMake/wasm_spec_tests.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Meta/CMake/wasm_spec_tests.cmake b/Meta/CMake/wasm_spec_tests.cmake index 05f3154b1a..93f152223d 100644 --- a/Meta/CMake/wasm_spec_tests.cmake +++ b/Meta/CMake/wasm_spec_tests.cmake @@ -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}) - execute_process(COMMAND "${TAR_TOOL}" -xzf ${WASM_SPEC_TEST_GZ_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)