eccodes/examples/F90/CMakeLists.txt

177 lines
5.6 KiB
CMake
Raw Normal View History

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
####################
if( HAVE_BUILD_TOOLS )
list( APPEND tests_sanity
2022-05-20 12:45:22 +00:00
codes_ecc-1392
codes_datetime_julian
2023-08-23 18:19:11 +00:00
codes_set_paths
codes_f90_misc
grib_set_pv
grib_set_data
2023-12-30 14:17:26 +00:00
grib_set_data_force
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
grib_ecc-671 )
list( APPEND tests_extra
grib_index
2023-08-22 13:39:28 +00:00
codes_dump
codes_scan_file
2024-01-06 13:54:53 +00:00
codes_load_file
grib_copy_message
bufr_copy_message
grib_get_keys
grib_get_data
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
grib_keys_iterator
2023-12-26 13:26:25 +00:00
grib_keys_iterator_skip
grib_multi_write
grib_multi
2023-12-30 17:56:53 +00:00
grib_elements
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
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
grib_read_from_file
2020-10-20 17:04:01 +00:00
grib_get_set_uuid
grib_clone
2021-12-01 22:03:19 +00:00
grib_ecc-1316
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
bufr_read_tempf
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
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
codes_f90_misc
2023-05-05 09:49:36 +00:00
get_native_type
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
grib_keys_iterator
2023-12-26 13:26:25 +00:00
grib_keys_iterator_skip
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
grib_precision
grib_print_data
grib_set_missing
grib_samples
grib_count_messages
grib_count_messages_multi
grib_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
bufr_read_tempf
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
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()
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
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
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
2014-03-31 12:57:06 +00:00
endforeach()
# 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_BUILD_TOOLS AND 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 )
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
# )