forked from simongog/sdsl-lite
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included Faust.txt and Moby.int into git repo
- Loading branch information
1 parent
d282914
commit 3ff8c61
Showing
5 changed files
with
14 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
## download | ||
## Download files specified in a ${CMAKE_CURRENT_LIST_DIR}/download.config | ||
# Each file should be specified on a seperate line as tuple (file;URL) | ||
# TODO: move to CMakeLists.txt? or is it needed by examples/tutorials? | ||
# TODO: should the files be made a target? | ||
|
||
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/download.config download_config_lines REGEX "^[^#].*") | ||
foreach(download_config_line ${download_config_lines}) | ||
list(GET download_config_line 0 download_file) | ||
list(GET download_config_line 1 download_url) | ||
string(REPLACE ".tar.gz" "" download_file_we ${download_file}) | ||
set(abs_test_case_name ${CMAKE_CURRENT_LIST_DIR}/test_cases/${download_file_we}) | ||
|
||
add_custom_command(OUTPUT ${abs_test_case_name} | ||
COMMAND ${CMAKE_COMMAND} -Ddownload_url=${download_url} -Dtest_case_dir=${CMAKE_CURRENT_LIST_DIR}/test_cases -P ${CMAKE_CURRENT_LIST_DIR}/download.cmake | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} | ||
COMMENT "Checking or downloading test case ${download_file}." | ||
VERBATIM | ||
) | ||
add_custom_target(${download_file_we} | ||
DEPENDS ${abs_test_case_name}) | ||
list(APPEND generated_files ${abs_test_case_name}) | ||
endforeach(download_config_line) | ||
# TODO: path correct? | ||
file(GLOB ZIPPED_TEST_CASES ${CMAKE_CURRENT_LIST_DIR}/test_cases/*.tar.gz) | ||
|
||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test_cases") | ||
|
||
foreach(zipped_test_case ${ZIPPED_TEST_CASES}) | ||
get_filename_component(file_name ${zipped_test_case} NAME) | ||
string(REPLACE ".tar.gz" "" file_name ${file_name}) | ||
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/test_cases/${file_name}") | ||
message("Unzipped ${file_name}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${zipped_test_case} | ||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/test_cases/") | ||
endif() | ||
endforeach(zipped_test_case) |
Binary file not shown.
Binary file not shown.