2015-03-17 17:18:18 +00:00
|
|
|
# data/gts/CMakeLists.txt
|
|
|
|
# Download all the GTS data and reference files from website
|
|
|
|
#
|
2020-03-30 13:07:31 +00:00
|
|
|
file(READ "gts_data_files.txt" gts_files_to_download)
|
|
|
|
string(REGEX REPLACE "\n" ";" gts_files_to_download "${gts_files_to_download}")
|
2015-03-17 17:18:18 +00:00
|
|
|
|
2020-03-30 13:07:31 +00:00
|
|
|
file(READ "gts_ref_files.txt" gts_refs_to_download)
|
|
|
|
string(REGEX REPLACE "\n" ";" gts_refs_to_download "${gts_refs_to_download}")
|
2015-03-17 17:18:18 +00:00
|
|
|
|
2018-10-23 15:33:07 +00:00
|
|
|
if( ENABLE_EXTRA_TESTS )
|
|
|
|
ecbuild_get_test_multidata(
|
|
|
|
TARGET eccodes_download_gts
|
|
|
|
NOCHECK
|
|
|
|
NAMES ${gts_files_to_download} ${gts_refs_to_download}
|
|
|
|
)
|
|
|
|
endif()
|
2015-03-17 17:18:18 +00:00
|
|
|
|
|
|
|
# Copy other files - e.g. text files etc from the source data/gts dir
|
2020-03-30 13:07:31 +00:00
|
|
|
list(APPEND other_files
|
2015-03-17 17:18:18 +00:00
|
|
|
gts_data_files.txt
|
|
|
|
gts_ref_files.txt
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach( file ${other_files} )
|
|
|
|
execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR} )
|
|
|
|
endforeach()
|