2014-03-31 12:57:06 +00:00
|
|
|
# examples/F90/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-03-31 12:57:06 +00:00
|
|
|
|
2020-08-08 12:07:16 +00:00
|
|
|
# Add all the tests
|
2021-03-13 21:10:16 +00:00
|
|
|
####################
|
2020-08-07 21:36:59 +00:00
|
|
|
if( HAVE_BUILD_TOOLS )
|
|
|
|
list( APPEND tests_sanity
|
|
|
|
grib_set_pv
|
|
|
|
grib_set_data
|
|
|
|
grib_ecc-671 )
|
|
|
|
list( APPEND tests_extra
|
|
|
|
grib_index
|
|
|
|
grib_copy_message
|
|
|
|
bufr_copy_message
|
|
|
|
grib_get_keys
|
|
|
|
grib_get_data
|
2020-10-20 16:36:25 +00:00
|
|
|
grib_get_pl
|
2020-10-20 16:46:08 +00:00
|
|
|
grib_get_pv
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_keys_iterator
|
|
|
|
grib_multi_write
|
|
|
|
grib_multi
|
|
|
|
grib_nearest
|
|
|
|
grib_precision
|
|
|
|
grib_print_data
|
|
|
|
grib_set_keys
|
|
|
|
grib_set_bitmap
|
|
|
|
grib_set_missing
|
|
|
|
grib_samples
|
|
|
|
grib_count_messages
|
|
|
|
grib_count_messages_multi
|
|
|
|
grib_copy_namespace
|
2020-10-20 17:04:01 +00:00
|
|
|
grib_read_message
|
2020-08-07 21:36:59 +00:00
|
|
|
read_from_file
|
2020-10-20 17:04:01 +00:00
|
|
|
grib_get_set_uuid
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_clone
|
|
|
|
bufr_attributes
|
|
|
|
bufr_copy_data
|
|
|
|
bufr_clone
|
|
|
|
bufr_expanded
|
|
|
|
bufr_get_keys
|
|
|
|
bufr_get_string_array
|
|
|
|
bufr_keys_iterator
|
|
|
|
bufr_read_header
|
|
|
|
bufr_read_scatterometer
|
|
|
|
bufr_read_synop
|
|
|
|
bufr_read_temp
|
2020-12-13 16:43:16 +00:00
|
|
|
bufr_read_tempf
|
2020-08-07 21:36:59 +00:00
|
|
|
bufr_read_tropical_cyclone
|
|
|
|
bufr_set_keys
|
|
|
|
bufr_copy_keys
|
|
|
|
bufr_subset
|
|
|
|
get_product_kind )
|
|
|
|
else()
|
2020-08-08 12:07:16 +00:00
|
|
|
# No command line tools
|
2020-08-07 21:36:59 +00:00
|
|
|
list( APPEND tests_sanity
|
|
|
|
grib_set_pv
|
|
|
|
grib_set_data
|
|
|
|
grib_ecc-671 )
|
|
|
|
list( APPEND tests_extra
|
|
|
|
grib_index
|
|
|
|
grib_get_keys
|
|
|
|
grib_get_data
|
2020-10-20 16:36:25 +00:00
|
|
|
grib_get_pl
|
2020-10-20 16:46:08 +00:00
|
|
|
grib_get_pv
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_keys_iterator
|
|
|
|
grib_multi
|
|
|
|
grib_nearest
|
|
|
|
grib_precision
|
|
|
|
grib_print_data
|
|
|
|
grib_set_missing
|
|
|
|
grib_samples
|
|
|
|
grib_count_messages
|
|
|
|
grib_count_messages_multi
|
|
|
|
read_from_file
|
|
|
|
grib_clone
|
|
|
|
bufr_attributes
|
|
|
|
bufr_clone
|
|
|
|
bufr_expanded
|
|
|
|
bufr_get_keys
|
|
|
|
bufr_get_string_array
|
|
|
|
bufr_keys_iterator
|
|
|
|
bufr_read_header
|
|
|
|
bufr_read_scatterometer
|
|
|
|
bufr_read_synop
|
|
|
|
bufr_read_temp
|
2020-12-13 16:43:16 +00:00
|
|
|
bufr_read_tempf
|
2020-08-07 21:36:59 +00:00
|
|
|
bufr_read_tropical_cyclone
|
|
|
|
bufr_set_keys
|
|
|
|
bufr_subset
|
|
|
|
get_product_kind )
|
|
|
|
endif()
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2020-07-03 14:40:05 +00:00
|
|
|
foreach( tool ${tests_sanity} )
|
2020-07-03 15:09:25 +00:00
|
|
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
|
|
|
SOURCES ${tool}.f90
|
2015-07-02 12:02:54 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2020-07-03 15:09:25 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
|
|
|
CONDITION HAVE_FORTRAN
|
|
|
|
LABELS "sanity"
|
|
|
|
RESOURCES bufr_read_scatterometer_f.ref
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh )
|
2018-10-23 15:33:07 +00:00
|
|
|
endforeach()
|
|
|
|
foreach( tool ${tests_extra} )
|
2020-07-03 15:09:25 +00:00
|
|
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
|
|
|
SOURCES ${tool}.f90
|
2018-10-23 15:33:07 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2020-07-03 15:09:25 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
|
|
|
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
|
|
|
|
RESOURCES bufr_read_scatterometer_f.ref
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
|
|
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs )
|
2014-03-31 12:57:06 +00:00
|
|
|
endforeach()
|
|
|
|
|
2021-01-13 20:52:50 +00:00
|
|
|
# Test for CCSDS (AEC) packing
|
|
|
|
ecbuild_add_test( TARGET eccodes_f_grib_set_packing
|
|
|
|
SOURCES grib_set_packing.f90
|
|
|
|
LINKER_LANGUAGE Fortran
|
|
|
|
LIBS eccodes_f90 eccodes
|
|
|
|
CONDITION HAVE_AEC AND HAVE_FORTRAN
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
|
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
# Executables without a shell script
|
2016-11-10 18:04:54 +00:00
|
|
|
ecbuild_add_executable( TARGET eccodes_f_new_from_file
|
2014-03-31 12:57:06 +00:00
|
|
|
NOINSTALL
|
|
|
|
SOURCES new_from_file.f90
|
2015-06-09 13:50:51 +00:00
|
|
|
CONDITION HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2020-03-30 13:07:31 +00:00
|
|
|
LIBS eccodes_f90 eccodes )
|
2016-03-30 09:37:34 +00:00
|
|
|
ecbuild_add_executable( TARGET eccodes_f_grib_set_gvc
|
2014-03-31 12:57:06 +00:00
|
|
|
NOINSTALL
|
2016-03-30 09:37:34 +00:00
|
|
|
SOURCES grib_set_gvc.f90
|
2015-06-09 13:50:51 +00:00
|
|
|
CONDITION HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2020-03-30 13:07:31 +00:00
|
|
|
LIBS eccodes_f90 eccodes )
|
2016-03-29 14:47:55 +00:00
|
|
|
ecbuild_add_executable( TARGET eccodes_f_grib_print_data_static
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES grib_print_data_static.f90
|
|
|
|
CONDITION HAVE_FORTRAN
|
|
|
|
LINKER_LANGUAGE Fortran
|
2020-03-30 13:07:31 +00:00
|
|
|
LIBS eccodes_f90 eccodes )
|
2014-03-31 12:57:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
# # Note extra dependency
|
2015-07-14 16:11:57 +00:00
|
|
|
# ecbuild_add_test( TARGET eccodes_f_set_test
|
2014-03-31 12:57:06 +00:00
|
|
|
# TYPE SCRIPT
|
|
|
|
# DEPENDS set_gvc set
|
|
|
|
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/set.sh
|
|
|
|
# )
|