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
|
|
|
|
|
|
|
# Build the executables used by test scripts
|
|
|
|
################################################
|
2020-07-03 14:40:05 +00:00
|
|
|
list( APPEND tests_sanity
|
2018-10-23 15:33:07 +00:00
|
|
|
grib_set_pv
|
|
|
|
grib_set_data
|
2020-03-30 13:07:31 +00:00
|
|
|
grib_ecc-671 )
|
2018-10-23 15:33:07 +00:00
|
|
|
list( APPEND tests_extra
|
2015-03-18 13:24:48 +00:00
|
|
|
grib_index
|
2016-08-25 15:28:20 +00:00
|
|
|
grib_copy_message
|
2016-03-29 17:56:11 +00:00
|
|
|
bufr_copy_message
|
2015-03-17 13:19:09 +00:00
|
|
|
grib_get_keys
|
2016-08-25 18:08:19 +00:00
|
|
|
grib_get_data
|
2014-03-31 12:57:06 +00:00
|
|
|
get_pl
|
|
|
|
get_pv
|
2015-03-17 15:01:07 +00:00
|
|
|
grib_keys_iterator
|
2015-03-18 11:57:18 +00:00
|
|
|
grib_multi_write
|
2015-03-18 11:44:55 +00:00
|
|
|
grib_multi
|
2015-03-17 15:55:36 +00:00
|
|
|
grib_nearest
|
2015-03-18 13:06:18 +00:00
|
|
|
grib_precision
|
2015-03-17 15:41:04 +00:00
|
|
|
grib_print_data
|
2015-03-17 15:23:16 +00:00
|
|
|
grib_set_keys
|
2015-03-17 16:17:33 +00:00
|
|
|
grib_set_bitmap
|
2016-08-25 15:48:21 +00:00
|
|
|
grib_set_missing
|
2016-08-25 16:06:47 +00:00
|
|
|
grib_samples
|
2016-04-27 16:23:14 +00:00
|
|
|
grib_count_messages
|
2016-04-27 15:50:17 +00:00
|
|
|
grib_count_messages_multi
|
2016-11-10 18:04:54 +00:00
|
|
|
grib_copy_namespace
|
2014-03-31 12:57:06 +00:00
|
|
|
read_message
|
|
|
|
read_from_file
|
|
|
|
get_set_uuid
|
2015-03-17 14:01:14 +00:00
|
|
|
grib_clone
|
2015-02-25 12:19:18 +00:00
|
|
|
bufr_attributes
|
2016-10-18 10:43:42 +00:00
|
|
|
bufr_copy_data
|
2015-02-04 16:32:00 +00:00
|
|
|
bufr_clone
|
2015-02-06 09:32:42 +00:00
|
|
|
bufr_expanded
|
2015-02-06 11:44:01 +00:00
|
|
|
bufr_get_keys
|
2016-06-16 10:47:16 +00:00
|
|
|
bufr_get_string_array
|
2015-02-09 12:30:11 +00:00
|
|
|
bufr_keys_iterator
|
2015-03-25 17:39:58 +00:00
|
|
|
bufr_read_header
|
|
|
|
bufr_read_scatterometer
|
2015-03-17 16:13:20 +00:00
|
|
|
bufr_read_synop
|
2015-03-16 15:58:38 +00:00
|
|
|
bufr_read_temp
|
2015-11-18 14:40:34 +00:00
|
|
|
bufr_read_tropical_cyclone
|
2015-02-06 14:23:28 +00:00
|
|
|
bufr_set_keys
|
2016-11-10 17:05:02 +00:00
|
|
|
bufr_copy_keys
|
2015-02-09 12:30:11 +00:00
|
|
|
bufr_subset
|
2020-03-30 13:07:31 +00:00
|
|
|
get_product_kind )
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2020-07-03 14:40:05 +00:00
|
|
|
foreach( tool ${tests_sanity} )
|
2015-07-14 16:11:57 +00:00
|
|
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
2015-07-02 12:02:54 +00:00
|
|
|
SOURCES ${tool}.f90
|
|
|
|
LINKER_LANGUAGE Fortran
|
|
|
|
LIBS eccodes_f90 eccodes
|
2015-06-09 13:50:51 +00:00
|
|
|
CONDITION HAVE_FORTRAN
|
2015-11-24 16:29:43 +00:00
|
|
|
RESOURCES bufr_read_scatterometer_f.ref
|
2020-03-30 13:07:31 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh )
|
2020-07-03 14:43:33 +00:00
|
|
|
if( HAVE_FORTRAN )
|
|
|
|
set_tests_properties( eccodes_f_${tool} PROPERTIES LABELS "sanity" )
|
|
|
|
endif()
|
2018-10-23 15:33:07 +00:00
|
|
|
endforeach()
|
|
|
|
foreach( tool ${tests_extra} )
|
|
|
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
|
|
|
SOURCES ${tool}.f90
|
|
|
|
LINKER_LANGUAGE Fortran
|
|
|
|
LIBS eccodes_f90 eccodes
|
|
|
|
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
|
|
|
|
RESOURCES bufr_read_scatterometer_f.ref
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
2020-03-30 13:07:31 +00:00
|
|
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs )
|
2014-03-31 12:57:06 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# Executables without a shell script
|
|
|
|
# TODO
|
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
|
|
|
|
# )
|