2014-03-31 12:57:06 +00:00
|
|
|
# examples/C/CMakeLists.txt
|
|
|
|
|
|
|
|
# Configure the file which all CMake tests will include
|
|
|
|
configure_file( include.ctest.sh.in include.ctest.sh @ONLY )
|
|
|
|
|
|
|
|
|
|
|
|
# Build the executables used by test scripts
|
|
|
|
################################################
|
|
|
|
list( APPEND test_bins
|
2015-03-17 15:55:36 +00:00
|
|
|
grib_nearest
|
2015-03-17 16:17:33 +00:00
|
|
|
grib_set_bitmap
|
2015-03-17 14:21:14 +00:00
|
|
|
grib_iterator
|
2015-03-17 13:19:09 +00:00
|
|
|
grib_get_keys
|
2015-03-17 15:41:04 +00:00
|
|
|
grib_print_data
|
2015-03-17 15:23:16 +00:00
|
|
|
grib_set_keys
|
2014-03-31 12:57:06 +00:00
|
|
|
set_missing
|
2015-03-17 15:01:07 +00:00
|
|
|
grib_keys_iterator
|
2015-03-17 16:26:03 +00:00
|
|
|
grib_set_data
|
2014-03-31 12:57:06 +00:00
|
|
|
mars_param
|
|
|
|
values_check
|
|
|
|
box
|
|
|
|
multi
|
|
|
|
multi2
|
|
|
|
multi_write
|
|
|
|
precision
|
2015-03-17 17:39:55 +00:00
|
|
|
grib_set_pv
|
2014-03-31 12:57:06 +00:00
|
|
|
list
|
|
|
|
get_data
|
|
|
|
sections_copy
|
2015-03-17 14:40:42 +00:00
|
|
|
grib_iterator_bitmap
|
2014-03-31 12:57:06 +00:00
|
|
|
large_grib1
|
2015-03-17 14:01:14 +00:00
|
|
|
grib_clone
|
2014-06-18 16:14:01 +00:00
|
|
|
check_gaussian_grid
|
2015-03-17 14:46:35 +00:00
|
|
|
grib_ensemble_index
|
2015-03-12 12:54:18 +00:00
|
|
|
get_product_kind
|
2015-02-25 12:19:18 +00:00
|
|
|
bufr_attributes
|
2015-02-04 15:58:52 +00:00
|
|
|
bufr_clone
|
2015-02-05 16:29:49 +00:00
|
|
|
bufr_expanded
|
2015-02-06 11:44:01 +00:00
|
|
|
bufr_get_keys
|
2015-02-06 16:38:23 +00:00
|
|
|
bufr_keys_iterator
|
2015-02-27 12:50:03 +00:00
|
|
|
bufr_missing
|
2015-03-17 10:39:22 +00:00
|
|
|
bufr_read_header
|
|
|
|
bufr_read_synop
|
2015-03-05 11:05:18 +00:00
|
|
|
bufr_read_temp
|
2015-02-06 14:23:28 +00:00
|
|
|
bufr_set_keys
|
2015-02-05 16:29:49 +00:00
|
|
|
bufr_subset
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
foreach( tool ${test_bins} )
|
|
|
|
ecbuild_add_executable( TARGET ${tool}
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES ${tool}.c
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
2015-01-24 19:00:15 +00:00
|
|
|
# Now add each test (shell scripts)
|
2014-03-31 12:57:06 +00:00
|
|
|
#################################################
|
2014-03-31 16:15:20 +00:00
|
|
|
list( APPEND tests
|
2015-03-17 14:21:14 +00:00
|
|
|
grib_iterator
|
2015-03-17 13:19:09 +00:00
|
|
|
grib_get_keys
|
2015-03-17 15:41:04 +00:00
|
|
|
grib_print_data
|
2015-03-17 15:23:16 +00:00
|
|
|
grib_set_keys
|
2015-03-17 15:01:07 +00:00
|
|
|
grib_keys_iterator
|
2014-03-31 16:15:20 +00:00
|
|
|
multi
|
|
|
|
multi_write
|
|
|
|
precision
|
|
|
|
list
|
|
|
|
large_grib1
|
|
|
|
get_data
|
|
|
|
set_missing
|
2015-03-17 14:01:14 +00:00
|
|
|
grib_clone
|
2014-03-31 16:15:20 +00:00
|
|
|
sections_copy
|
2015-03-17 17:39:55 +00:00
|
|
|
grib_set_pv
|
2014-10-28 11:31:32 +00:00
|
|
|
check_gaussian_grids
|
2015-02-25 12:19:18 +00:00
|
|
|
bufr_attributes
|
2015-02-04 15:58:52 +00:00
|
|
|
bufr_clone
|
2015-02-05 16:29:49 +00:00
|
|
|
bufr_expanded
|
2015-02-06 11:44:01 +00:00
|
|
|
bufr_get_keys
|
2015-02-06 16:38:23 +00:00
|
|
|
bufr_keys_iterator
|
2015-02-27 12:50:03 +00:00
|
|
|
bufr_missing
|
2015-03-17 10:39:22 +00:00
|
|
|
bufr_read_header
|
|
|
|
bufr_read_synop
|
2015-03-05 11:05:18 +00:00
|
|
|
bufr_read_temp
|
2015-02-06 14:23:28 +00:00
|
|
|
bufr_set_keys
|
2015-02-05 16:29:49 +00:00
|
|
|
bufr_subset
|
2015-03-12 12:54:18 +00:00
|
|
|
get_product_kind
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
2014-07-28 09:27:13 +00:00
|
|
|
foreach( test ${tests} )
|
2014-03-31 16:15:20 +00:00
|
|
|
ecbuild_add_test( TARGET c_${test}
|
|
|
|
TYPE SCRIPT
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
|
|
|
RESOURCES include.sh
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs get_bufrs
|
2014-03-31 16:15:20 +00:00
|
|
|
)
|
|
|
|
endforeach()
|
2014-03-31 12:57:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
# Tests with no script
|
|
|
|
ecbuild_add_test( TARGET c_new_sample
|
2013-04-10 15:46:41 +00:00
|
|
|
SOURCES new_sample.c
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes
|
2015-02-03 16:31:51 +00:00
|
|
|
ARGS "out.grib"
|
2015-01-23 22:47:51 +00:00
|
|
|
ENVIRONMENT "ECCODES_SAMPLES_PATH=${PROJECT_SOURCE_DIR}/samples" "ECCODES_DEFINITION_PATH=${PROJECT_SOURCE_DIR}/definitions"
|
2014-03-31 16:15:20 +00:00
|
|
|
)
|
2013-04-10 15:46:41 +00:00
|
|
|
|