2014-03-31 12:57:06 +00:00
|
|
|
# examples/C/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 test_bins
|
|
|
|
nearest
|
|
|
|
set_bitmap
|
|
|
|
iterator
|
|
|
|
get
|
|
|
|
print_data
|
|
|
|
set
|
|
|
|
set_missing
|
|
|
|
keys_iterator
|
|
|
|
set_data
|
|
|
|
mars_param
|
|
|
|
values_check
|
|
|
|
box
|
|
|
|
multi
|
|
|
|
multi2
|
|
|
|
multi_write
|
|
|
|
precision
|
|
|
|
set_pv
|
|
|
|
list
|
|
|
|
get_data
|
|
|
|
sections_copy
|
|
|
|
iterator_bitmap
|
|
|
|
large_grib1
|
|
|
|
clone
|
2014-06-18 16:14:01 +00:00
|
|
|
check_gaussian_grid
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
foreach( tool ${test_bins} )
|
|
|
|
ecbuild_add_executable( TARGET ${tool}
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES ${tool}.c
|
|
|
|
LIBS grib_api
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# Now add each test
|
|
|
|
#################################################
|
2014-03-31 16:15:20 +00:00
|
|
|
list( APPEND tests
|
|
|
|
iterator
|
|
|
|
get
|
|
|
|
print_data
|
|
|
|
set
|
|
|
|
keys_iterator
|
|
|
|
multi
|
|
|
|
multi_write
|
|
|
|
precision
|
|
|
|
list
|
|
|
|
large_grib1
|
|
|
|
get_data
|
|
|
|
set_missing
|
|
|
|
clone
|
|
|
|
sections_copy
|
2014-07-01 13:43:26 +00:00
|
|
|
set_pv
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
2014-07-22 09:36:25 +00:00
|
|
|
foreach ( test ${tests} )
|
2014-03-31 16:15:20 +00:00
|
|
|
ecbuild_add_test( TARGET c_${test}
|
|
|
|
TYPE SCRIPT
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
|
|
|
RESOURCES include.sh
|
|
|
|
)
|
|
|
|
endforeach()
|
2014-03-31 12:57:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
# Tests with no script
|
|
|
|
ecbuild_add_test( TARGET c_new_sample
|
2013-04-10 15:46:41 +00:00
|
|
|
SOURCES new_sample.c
|
2014-03-31 12:57:06 +00:00
|
|
|
LIBS grib_api
|
2013-04-10 15:46:41 +00:00
|
|
|
ARGS "out.grib"
|
2014-03-31 16:15:20 +00:00
|
|
|
ENVIRONMENT "GRIB_SAMPLES_PATH=${PROJECT_SOURCE_DIR}/samples" "GRIB_DEFINITION_PATH=${PROJECT_SOURCE_DIR}/definitions"
|
|
|
|
)
|
2013-04-10 15:46:41 +00:00
|
|
|
|