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 )
|
|
|
|
|
|
|
|
|
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
|
2022-05-20 12:45:22 +00:00
|
|
|
codes_ecc-1392
|
2023-08-11 14:49:28 +00:00
|
|
|
codes_datetime_julian
|
2023-08-23 18:19:11 +00:00
|
|
|
codes_set_paths
|
2023-12-18 14:01:48 +00:00
|
|
|
codes_f90_misc
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_set_pv
|
|
|
|
grib_set_data
|
2023-12-30 14:17:26 +00:00
|
|
|
grib_set_data_force
|
2021-09-16 15:47:25 +00:00
|
|
|
bufr_ecc-1284
|
2022-04-27 16:33:55 +00:00
|
|
|
bufr_ecc-1019
|
2023-05-05 09:49:36 +00:00
|
|
|
get_native_type
|
2024-12-05 19:50:54 +00:00
|
|
|
key_is_computed
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_ecc-671 )
|
|
|
|
list( APPEND tests_extra
|
|
|
|
grib_index
|
2023-08-22 13:39:28 +00:00
|
|
|
codes_dump
|
2024-01-02 15:12:57 +00:00
|
|
|
codes_scan_file
|
2024-01-06 13:54:53 +00:00
|
|
|
codes_load_file
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_copy_message
|
2024-01-21 14:34:54 +00:00
|
|
|
grib_sections_copy
|
2020-08-07 21:36:59 +00:00
|
|
|
bufr_copy_message
|
|
|
|
grib_get_keys
|
|
|
|
grib_get_data
|
2023-12-25 20:37:34 +00:00
|
|
|
grib_get_data_real4
|
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
|
2023-12-26 13:26:25 +00:00
|
|
|
grib_keys_iterator_skip
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_multi_write
|
|
|
|
grib_multi
|
2023-12-30 17:56:53 +00:00
|
|
|
grib_elements
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_nearest
|
2023-12-26 12:53:44 +00:00
|
|
|
grib_nearest_single
|
2024-01-05 18:57:22 +00:00
|
|
|
grib_nearest_four_single
|
2020-08-07 21:36:59 +00:00
|
|
|
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
|
2021-04-26 13:10:58 +00:00
|
|
|
grib_read_from_file
|
2024-01-08 13:42:39 +00:00
|
|
|
grib_read_bytes
|
2020-10-20 17:04:01 +00:00
|
|
|
grib_get_set_uuid
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_clone
|
2021-12-01 22:03:19 +00:00
|
|
|
grib_ecc-1316
|
2024-10-03 11:36:21 +00:00
|
|
|
grib_infinity_grid_second_order
|
2020-08-07 21:36:59 +00:00
|
|
|
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_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
|
2023-12-30 14:17:26 +00:00
|
|
|
grib_set_data_force
|
2023-08-23 18:19:11 +00:00
|
|
|
codes_set_paths
|
2023-12-18 14:01:48 +00:00
|
|
|
codes_f90_misc
|
2023-05-05 09:49:36 +00:00
|
|
|
get_native_type
|
2024-12-05 19:50:54 +00:00
|
|
|
key_is_computed
|
2020-08-07 21:36:59 +00:00
|
|
|
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
|
2023-12-26 13:26:25 +00:00
|
|
|
grib_keys_iterator_skip
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_multi
|
|
|
|
grib_nearest
|
2023-12-30 17:56:53 +00:00
|
|
|
grib_elements
|
2023-12-26 12:53:44 +00:00
|
|
|
grib_nearest_single
|
2024-01-05 18:57:22 +00:00
|
|
|
grib_nearest_four_single
|
2020-08-07 21:36:59 +00:00
|
|
|
grib_precision
|
|
|
|
grib_print_data
|
|
|
|
grib_set_missing
|
|
|
|
grib_samples
|
|
|
|
grib_count_messages
|
|
|
|
grib_count_messages_multi
|
2021-04-26 13:10:58 +00:00
|
|
|
grib_read_from_file
|
2020-08-07 21:36:59 +00:00
|
|
|
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
|
|
|
|
2023-03-15 14:58:41 +00:00
|
|
|
foreach( atest ${tests_sanity} )
|
|
|
|
ecbuild_add_test( TARGET eccodes_f_${atest}
|
|
|
|
SOURCES ${atest}.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
|
2023-03-15 14:58:41 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh )
|
2018-10-23 15:33:07 +00:00
|
|
|
endforeach()
|
2024-02-12 14:59:53 +00:00
|
|
|
|
|
|
|
if( HAVE_BUILD_TOOLS AND NOT CMAKE_CXX_COMPILER_ID MATCHES NVHPC )
|
|
|
|
# Test which fails on Leonardo
|
|
|
|
list( APPEND tests_extra bufr_copy_data )
|
|
|
|
endif()
|
|
|
|
|
2023-03-15 14:58:41 +00:00
|
|
|
foreach( atest ${tests_extra} )
|
|
|
|
ecbuild_add_test( TARGET eccodes_f_${atest}
|
|
|
|
SOURCES ${atest}.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
|
2023-03-15 14:58:41 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh
|
2023-02-26 15:07:26 +00:00
|
|
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
|
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
|
2023-02-27 10:32:58 +00:00
|
|
|
CONDITION HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN
|
2021-01-13 20:52:50 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
|
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
# Executables without a shell script
|
2024-08-17 10:58:36 +00:00
|
|
|
#ecbuild_add_executable( TARGET eccodes_f_new_from_file
|
|
|
|
# NOINSTALL
|
|
|
|
# SOURCES new_from_file.f90
|
|
|
|
# CONDITION HAVE_FORTRAN
|
|
|
|
# LINKER_LANGUAGE Fortran
|
|
|
|
# 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
|
|
|
|
# )
|