naaice_tug_input/eval/CMakeLists.txt

32 lines
1019 B
CMake

set(benchmarks
"${CMAKE_CURRENT_SOURCE_DIR}/barite_200"
"${CMAKE_CURRENT_SOURCE_DIR}/barite_large"
"${CMAKE_CURRENT_SOURCE_DIR}/surfex"
)
foreach(benchmark ${benchmarks})
# find tar.gz files
file(GLOB_RECURSE tar_files "${benchmark}/*.tar.gz")
foreach(tar_file ${tar_files})
# get the name of the tar file
get_filename_component(tar_name ${tar_file} NAME_WE)
# get the name of the directory
get_filename_component(dir_name ${tar_file} DIRECTORY)
get_filename_component(dir_name ${dir_name} NAME)
# create the directory
message("Extracting ${tar_name} to ${dir_name}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${dir_name}")
# extract the tar file
execute_process(
COMMAND tar -xzf ${tar_file}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${dir_name}"
)
endforeach()
endforeach()
set(BARITE_200_BENCH "${CMAKE_BINARY_DIR}/barite_200")
set(BARITE_LARGE_BENCH "${CMAKE_BINARY_DIR}/barite_large")
set(SURFEX_BENCH "${CMAKE_BINARY_DIR}/surfex")
configure_file(bench_defs.hpp.in bench_defs.hpp)