eccodes/examples/python/CMakeLists.txt

65 lines
1.5 KiB
CMake
Raw Normal View History

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 )
# Build the executables used by test scripts
################################################
list( APPEND test_bins
keys_iterator
print_data
grib_iterator
2014-04-01 08:54:03 +00:00
count_messages
)
foreach( tool ${test_bins} )
ecbuild_add_executable( TARGET p_${tool}
NOINSTALL
SOURCES ${tool}.c
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()
# Now add each test
#################################################
list( APPEND tests
grib_clone
2014-04-01 08:54:03 +00:00
count_messages
grib_get_keys
2014-04-01 08:54:03 +00:00
index
grib_iterator
2014-04-01 08:54:03 +00:00
keys_iterator
multi_write
nearest
print_data
samples
set
set_missing
binary_message
set_bitmap
bufr_attributes
2015-02-09 15:41:15 +00:00
bufr_clone
bufr_expanded
bufr_get_keys
bufr_keys_iterator
2015-02-04 15:43:49 +00:00
bufr_print_header
2015-02-09 15:41:15 +00:00
bufr_print_data
bufr_read_temp
2015-02-09 15:41:15 +00:00
bufr_set_keys
bufr_subset
2015-03-12 18:04:42 +00:00
get_product_kind
2014-04-01 08:54:03 +00:00
)
2014-07-28 09:27:13 +00:00
foreach( test ${tests} )
2014-04-01 08:54:03 +00:00
ecbuild_add_test( TARGET p_${test}_test
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
CONDITION HAVE_PYTHON
2014-04-01 08:54:03 +00:00
RESOURCES include.sh ${test}.py
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
TEST_DEPENDS get_gribs get_tigge_gribs get_bufrs
2014-04-01 08:54:03 +00:00
)
endforeach()