1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
|
# examples/F90/CMakeLists.txt
# Configure the file which all CMake tests will include
configure_file( include.ctest.sh.in include.ctest.sh @ONLY )
list( APPEND test_bins
bufr_attributes
bufr_clone
bufr_copy_data
bufr_copy_keys
bufr_copy_message
bufr_ecc-1019
bufr_ecc-1284
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
codes_datetime_julian
codes_dump
codes_ecc-1392
codes_f90_misc
codes_load_file
codes_scan_file
codes_set_paths
get_native_type
get_product_kind
grib_clone
grib_get_message
grib_copy_message
grib_copy_namespace
grib_count_messages
grib_count_messages_multi
grib_ecc-1316
grib_ecc-671
grib_elements
grib_get_data
grib_get_data_real4
grib_get_keys
grib_get_pl
grib_get_pv
grib_get_set_uuid
grib_index
grib_keys_iterator
grib_keys_iterator_skip
grib_multi
grib_multi_write
grib_nearest
grib_nearest_four_single
grib_nearest_single
grib_precision
grib_print_data
grib_read_bytes
grib_read_from_file
grib_read_message
grib_samples
grib_sections_copy
grib_set_bitmap
grib_set_data
grib_set_data_force
grib_set_keys
grib_set_missing
grib_set_pv
key_is_computed)
foreach( tool ${test_bins} )
ecbuild_add_executable( TARGET f_${tool}
NOINSTALL
SOURCES ${tool}.f90
LINKER_LANGUAGE Fortran
CONDITION HAVE_FORTRAN
LIBS eccodes_f90 eccodes )
endforeach()
# Add all the tests
####################
if( HAVE_BUILD_TOOLS )
list( APPEND tests_sanity
codes_ecc-1392
codes_datetime_julian
codes_set_paths
codes_f90_misc
grib_set_pv
grib_set_data
grib_set_data_force
bufr_ecc-1284
bufr_ecc-1019
get_native_type
key_is_computed
grib_ecc-671 )
list( APPEND tests_extra
grib_index
codes_dump
codes_scan_file
codes_load_file
grib_get_message
grib_copy_message
grib_sections_copy
bufr_copy_message
grib_get_keys
grib_get_data
grib_get_data_real4
grib_get_pl
grib_get_pv
grib_keys_iterator
grib_keys_iterator_skip
grib_multi_write
grib_multi
grib_elements
grib_nearest
grib_nearest_single
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
grib_read_message
grib_read_from_file
grib_read_bytes
grib_get_set_uuid
grib_clone
grib_ecc-1316
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_copy_keys
bufr_subset
get_product_kind )
else()
# No command line tools
list( APPEND tests_sanity
grib_set_pv
grib_set_data
grib_set_data_force
codes_set_paths
codes_f90_misc
get_native_type
key_is_computed
grib_ecc-671 )
list( APPEND tests_extra
grib_index
grib_get_keys
grib_get_data
grib_get_pl
grib_get_pv
grib_keys_iterator
grib_keys_iterator_skip
grib_multi
grib_nearest
grib_elements
grib_nearest_single
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()
foreach( atest ${tests_sanity} )
ecbuild_add_test( TARGET eccodes_f_${atest}
TYPE SCRIPT
CONDITION HAVE_FORTRAN
LABELS "sanity"
RESOURCES bufr_read_scatterometer_f.ref
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh )
endforeach()
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()
foreach( atest ${tests_extra} )
ecbuild_add_test( TARGET eccodes_f_${atest}
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
RESOURCES bufr_read_scatterometer_f.ref
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
endforeach()
# Test for CCSDS (AEC) packing
if( HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN )
ecbuild_add_executable( TARGET f_grib_set_packing
NOINSTALL
SOURCES grib_set_packing.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes )
ecbuild_add_test( TARGET eccodes_f_grib_set_packing
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
endif()
# Executables without a shell script
#ecbuild_add_executable( TARGET f_new_from_file
# NOINSTALL
# SOURCES new_from_file.f90
# CONDITION HAVE_FORTRAN
# LINKER_LANGUAGE Fortran
# LIBS eccodes_f90 eccodes )
ecbuild_add_executable( TARGET f_grib_set_gvc
NOINSTALL
SOURCES grib_set_gvc.f90
CONDITION HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes )
ecbuild_add_executable( TARGET f_grib_print_data_static
NOINSTALL
SOURCES grib_print_data_static.f90
CONDITION HAVE_FORTRAN
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes )
# # Note extra dependency
# ecbuild_add_test( TARGET eccodes_f_set_test
# TYPE SCRIPT
# DEPENDS set_gvc set
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/set.sh
# )
|