eccodes/examples/F90/CMakeLists.txt

100 lines
3.0 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 )
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
################################################
list( APPEND tests
grib_index
2014-03-31 12:57:06 +00:00
copy_message
bufr_copy_message
grib_get_keys
2014-03-31 12:57:06 +00:00
get_data
get_pl
get_pv
grib_keys_iterator
grib_multi_write
grib_multi
grib_nearest
grib_precision
grib_print_data
grib_set_keys
grib_set_bitmap
2014-03-31 12:57:06 +00:00
set_missing
grib_set_pv
2014-03-31 12:57:06 +00:00
samples
count_messages
read_message
read_from_file
get_set_uuid
grib_clone
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
bufr_read_header
bufr_read_scatterometer
bufr_read_synop
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
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
)
foreach( tool ${tests} )
2014-04-02 13:23:29 +00:00
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
RESOURCES bufr_read_scatterometer_f.ref
2014-03-31 12:57:06 +00:00
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
2016-03-29 10:16:29 +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
ecbuild_add_executable( TARGET f_new_from_file
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
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
2015-06-09 13:50:51 +00:00
CONDITION 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
)
2015-07-14 16:50:28 +00:00
ecbuild_add_executable( TARGET eccodes_f_set_gvc
2014-03-31 12:57:06 +00:00
NOINSTALL
SOURCES 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
2015-02-13 18:04:42 +00:00
LIBS eccodes_f90 eccodes
2014-03-31 12:57:06 +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
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
# )