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 )
|
|
|
|
|
|
|
|
|
|
|
|
# Build the executables used by test scripts
|
|
|
|
################################################
|
|
|
|
list( APPEND tests
|
|
|
|
index
|
|
|
|
copy_message
|
2015-03-17 13:19:09 +00:00
|
|
|
grib_get_keys
|
2014-03-31 12:57:06 +00:00
|
|
|
get_data
|
|
|
|
get_pl
|
|
|
|
get_pv
|
|
|
|
keys_iterator
|
|
|
|
multi_write
|
|
|
|
multi
|
|
|
|
nearest
|
|
|
|
precision
|
|
|
|
print_data
|
|
|
|
set
|
|
|
|
set_bitmap
|
|
|
|
set_missing
|
|
|
|
set_pv
|
|
|
|
samples
|
|
|
|
count_messages
|
|
|
|
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
|
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
|
2015-02-09 12:30:11 +00:00
|
|
|
bufr_keys_iterator
|
2015-02-06 09:32:42 +00:00
|
|
|
bufr_print_header
|
|
|
|
bufr_print_data
|
2015-03-16 15:58:38 +00:00
|
|
|
bufr_read_temp
|
2015-02-06 14:23:28 +00:00
|
|
|
bufr_set_keys
|
2015-02-09 12:30:11 +00:00
|
|
|
bufr_subset
|
2015-03-12 16:28:31 +00:00
|
|
|
get_product_kind
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Simplify tests: no need to build executable and then test. All in one
|
|
|
|
# TODO
|
|
|
|
# ecbuild_add_test( TARGET test_f90_samples
|
|
|
|
# LINKER_LANGUAGE Fortran
|
|
|
|
# SOURCES samples.f90
|
2015-02-13 18:04:42 +00:00
|
|
|
# LIBS eccodes_f90 eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/samples.sh
|
2014-10-03 15:49:05 +00:00
|
|
|
# CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
# )
|
|
|
|
|
|
|
|
foreach( tool ${tests} )
|
2014-04-02 13:23:29 +00:00
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
# Build the Fortran executable
|
|
|
|
ecbuild_add_executable( TARGET f_${tool}
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES ${tool}.f90
|
2014-10-03 15:49:05 +00:00
|
|
|
CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
# Add the test which depends on the above executable
|
|
|
|
ecbuild_add_test( TARGET f_${tool}_test
|
|
|
|
TYPE SCRIPT
|
|
|
|
DEPENDS f_${tool}
|
2014-10-03 15:49:05 +00:00
|
|
|
CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
|
|
|
RESOURCES include.sh
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs get_bufrs
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# Executables without a shell script
|
|
|
|
# TODO
|
|
|
|
ecbuild_add_executable( TARGET f_new_from_file
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES new_from_file.f90
|
2014-10-03 15:49:05 +00:00
|
|
|
CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
ecbuild_add_executable( TARGET f_copy_namespace
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES copy_namespace.f90
|
2014-10-03 15:49:05 +00:00
|
|
|
CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
ecbuild_add_executable( TARGET f_set_gvc
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES set_gvc.f90
|
2014-10-03 15:49:05 +00:00
|
|
|
CONDITION EC_HAVE_FORTRAN
|
2014-03-31 12:57:06 +00:00
|
|
|
LINKER_LANGUAGE Fortran
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes_f90 eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# # Note extra dependency
|
|
|
|
# ecbuild_add_test( TARGET f_set_test
|
|
|
|
# TYPE SCRIPT
|
|
|
|
# DEPENDS set_gvc set
|
|
|
|
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/set.sh
|
|
|
|
# RESOURCES include.sh
|
|
|
|
# )
|
|
|
|
#
|