File: download.cmake

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,020 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (10 lines) | stat: -rw-r--r-- 533 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
GET_FILENAME_COMPONENT(file_name ${download_url} NAME)
SET(test_case_tar_gz ${test_case_dir}/${file_name})
MESSAGE("test_case_tar_gz=${test_case_tar_gz}")
FILE(DOWNLOAD ${download_url} ${test_case_tar_gz} STATUS status SHOW_PROGRESS)
LIST(GET status 0 status_code)
IF(NOT ${status_code} EQUAL 0)    
    MESSAGE(FATAL_ERROR "Downloading test file failed.\n ${status}\n")
ENDIF(NOT ${status_code} EQUAL 0)    
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${test_case_tar_gz}
                WORKING_DIRECTORY ${test_case_dir})