Meta: Remove extract_tar_path() function

It's identical to extract_path() after #23000.

No behavior change.
This commit is contained in:
Nico Weber 2024-01-29 20:41:38 -05:00 committed by Tim Flynn
parent 125d92fe85
commit ffcd5cf443
Notes: sideshowbarker 2024-07-16 18:26:46 +09:00
3 changed files with 2 additions and 8 deletions

View file

@ -18,7 +18,7 @@ if(INCLUDE_FLAC_SPEC_TESTS)
endif()
if(EXISTS ${FLAC_SPEC_TEST_GZ_PATH} AND NOT EXISTS ${FLAC_SPEC_TEST_PATH})
extract_tar_path(${FLAC_TEST_PATH} ${FLAC_SPEC_TEST_GZ_PATH} "flac-test-files-main/subset/*.flac" ${FLAC_SPEC_TEST_PATH})
extract_path(${FLAC_TEST_PATH} ${FLAC_SPEC_TEST_GZ_PATH} "flac-test-files-main/subset/*.flac" ${FLAC_SPEC_TEST_PATH})
file(RENAME "${FLAC_TEST_PATH}/flac-test-files-main/subset" ${FLAC_SPEC_TEST_PATH})
file(REMOVE "${FLAC_TEST_PATH}/flac-test-files-main")
endif()

View file

@ -261,9 +261,3 @@ function(extract_path dest_dir zip_path source_path dest_path)
file(ARCHIVE_EXTRACT INPUT "${zip_path}" DESTINATION "${dest_dir}" PATTERNS "${source_path}")
endif()
endfunction()
function(extract_tar_path dest_dir tar_path source_path dest_path)
if (EXISTS "${tar_path}" AND NOT EXISTS "${dest_path}")
file(ARCHIVE_EXTRACT INPUT "${tar_path}" DESTINATION "${dest_dir}" PATTERNS "${source_path}")
endif()
endfunction()

View file

@ -22,7 +22,7 @@ if(INCLUDE_WASM_SPEC_TESTS)
if(EXISTS ${WASM_SPEC_TEST_GZ_PATH} AND NOT EXISTS ${WASM_SPEC_TEST_PATH}/const_0.wasm)
message(STATUS "Extracting the WebAssembly testsuite from ${WASM_SPEC_TEST_GZ_PATH}...")
extract_tar_path("${CMAKE_CURRENT_BINARY_DIR}" "${WASM_SPEC_TEST_GZ_PATH}" "testsuite-main/*.wast" "${WASM_SPEC_TEST_PATH}")
extract_path("${CMAKE_CURRENT_BINARY_DIR}" "${WASM_SPEC_TEST_GZ_PATH}" "testsuite-main/*.wast" "${WASM_SPEC_TEST_PATH}")
file(MAKE_DIRECTORY ${WASM_SPEC_TEST_PATH})
file(GLOB WASM_TESTS "${CMAKE_CURRENT_BINARY_DIR}/testsuite-main/*.wast")
foreach(PATH ${WASM_TESTS})