2014-04-01 08:54:03 +00:00
|
|
|
# examples/python/CMakeLists.txt
|
|
|
|
|
|
|
|
# Configure the file which all CMake tests will include
|
|
|
|
configure_file( include.ctest.sh.in include.ctest.sh @ONLY )
|
|
|
|
|
2015-07-02 12:02:54 +00:00
|
|
|
execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/include.sh ${CMAKE_CURRENT_BINARY_DIR} )
|
2014-04-01 08:54:03 +00:00
|
|
|
|
|
|
|
# Build the executables used by test scripts
|
|
|
|
################################################
|
|
|
|
list( APPEND test_bins
|
2015-03-17 15:01:07 +00:00
|
|
|
grib_keys_iterator
|
2015-03-17 15:41:04 +00:00
|
|
|
grib_print_data
|
2015-03-17 14:21:14 +00:00
|
|
|
grib_iterator
|
2014-04-01 08:54:03 +00:00
|
|
|
count_messages
|
|
|
|
)
|
2015-07-02 12:02:54 +00:00
|
|
|
|
2014-04-01 08:54:03 +00:00
|
|
|
foreach( tool ${test_bins} )
|
|
|
|
ecbuild_add_executable( TARGET p_${tool}
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES ${tool}.c
|
2014-10-24 12:36:19 +00:00
|
|
|
CONDITION HAVE_PYTHON
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes
|
2014-04-01 08:54:03 +00:00
|
|
|
)
|
2014-07-10 11:49:35 +00:00
|
|
|
list( APPEND ptools p_${tool} )
|
2014-04-01 08:54:03 +00:00
|
|
|
endforeach()
|
|
|
|
|
2015-07-02 12:02:54 +00:00
|
|
|
|
2014-04-01 08:54:03 +00:00
|
|
|
# Now add each test
|
|
|
|
#################################################
|
|
|
|
list( APPEND tests
|
2015-03-17 14:01:14 +00:00
|
|
|
grib_clone
|
2014-04-01 08:54:03 +00:00
|
|
|
count_messages
|
2015-03-17 13:19:09 +00:00
|
|
|
grib_get_keys
|
2015-03-18 13:24:48 +00:00
|
|
|
grib_index
|
2015-03-17 14:21:14 +00:00
|
|
|
grib_iterator
|
2015-03-17 15:01:07 +00:00
|
|
|
grib_keys_iterator
|
2015-03-18 11:57:18 +00:00
|
|
|
grib_multi_write
|
2015-03-17 15:55:36 +00:00
|
|
|
grib_nearest
|
2015-03-17 15:41:04 +00:00
|
|
|
grib_print_data
|
2014-04-01 08:54:03 +00:00
|
|
|
samples
|
2015-03-17 15:23:16 +00:00
|
|
|
grib_set_keys
|
2014-04-01 08:54:03 +00:00
|
|
|
set_missing
|
|
|
|
binary_message
|
2015-03-17 16:17:33 +00:00
|
|
|
grib_set_bitmap
|
2015-02-25 12:19:18 +00:00
|
|
|
bufr_attributes
|
2015-02-09 15:41:15 +00:00
|
|
|
bufr_clone
|
|
|
|
bufr_expanded
|
|
|
|
bufr_get_keys
|
|
|
|
bufr_keys_iterator
|
2015-03-17 16:13:20 +00:00
|
|
|
bufr_read_header
|
2015-03-26 13:08:22 +00:00
|
|
|
bufr_read_scatterometer
|
2015-03-17 16:13:20 +00:00
|
|
|
bufr_read_synop
|
2015-03-16 15:58:38 +00:00
|
|
|
bufr_read_temp
|
2015-02-09 15:41:15 +00:00
|
|
|
bufr_set_keys
|
|
|
|
bufr_subset
|
2015-07-29 13:42:51 +00:00
|
|
|
bufr_read_tropical_cyclone
|
2015-03-12 18:04:42 +00:00
|
|
|
get_product_kind
|
2015-04-22 11:49:18 +00:00
|
|
|
gts_get_keys
|
2015-04-22 17:11:56 +00:00
|
|
|
metar_get_keys
|
2014-04-01 08:54:03 +00:00
|
|
|
)
|
2014-07-28 09:27:13 +00:00
|
|
|
foreach( test ${tests} )
|
2015-07-14 16:11:57 +00:00
|
|
|
ecbuild_add_test( TARGET eccodes_p_${test}_test
|
2014-04-01 08:54:03 +00:00
|
|
|
TYPE SCRIPT
|
2014-07-10 11:49:35 +00:00
|
|
|
DEPENDS ${ptools}
|
2014-04-01 08:54:03 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
2014-10-24 12:36:19 +00:00
|
|
|
CONDITION HAVE_PYTHON
|
2015-07-02 12:02:54 +00:00
|
|
|
RESOURCES ${test}.py
|
2014-04-01 08:54:03 +00:00
|
|
|
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
2015-07-14 16:11:57 +00:00
|
|
|
TEST_DEPENDS eccodes_get_gribs eccodes_get_tigge_gribs eccodes_get_bufrs
|
2014-04-01 08:54:03 +00:00
|
|
|
)
|
|
|
|
endforeach()
|