2014-03-31 12:57:06 +00:00
|
|
|
# examples/F90 include file for CMake
|
|
|
|
|
2018-08-15 11:00:07 +00:00
|
|
|
set -eax
|
2015-01-26 17:26:18 +00:00
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
proj_dir=@PROJECT_SOURCE_DIR@
|
|
|
|
data_dir=@PROJECT_BINARY_DIR@/data
|
2020-03-30 15:17:36 +00:00
|
|
|
HAVE_PRODUCT_BUFR=@HAVE_PRODUCT_BUFR@
|
|
|
|
HAVE_PRODUCT_GRIB=@HAVE_PRODUCT_GRIB@
|
2020-01-16 14:40:06 +00:00
|
|
|
HAVE_MEMFS=@HAVE_MEMFS@
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# use definitions from binary dir to test if installation will be correct
|
2017-02-03 13:49:24 +00:00
|
|
|
def_dir="@CMAKE_BINARY_DIR@/@ECCODES_DEFINITION_SUFF@"
|
2015-01-23 22:47:51 +00:00
|
|
|
ECCODES_DEFINITION_PATH="${def_dir}"
|
|
|
|
export ECCODES_DEFINITION_PATH
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2017-02-03 14:21:24 +00:00
|
|
|
tools_dir=@CMAKE_BINARY_DIR@/bin
|
2017-02-03 14:29:47 +00:00
|
|
|
examples_dir=@CMAKE_CURRENT_BINARY_DIR@
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2016-12-30 14:28:43 +00:00
|
|
|
# If this environment variable is set, then run the
|
|
|
|
# executables with valgrind
|
|
|
|
if test "x$ECCODES_TEST_WITH_VALGRIND" != "x"; then
|
|
|
|
tools_dir="valgrind --error-exitcode=1 -q $tools_dir"
|
|
|
|
examples_dir="valgrind --error-exitcode=1 -q $examples_dir"
|
|
|
|
fi
|
|
|
|
|
2015-03-10 18:19:51 +00:00
|
|
|
# use samples from binary dir to test if installation will be correct
|
2017-02-03 13:49:24 +00:00
|
|
|
samp_dir="@CMAKE_BINARY_DIR@/@ECCODES_SAMPLES_SUFF@"
|
2015-01-23 22:47:51 +00:00
|
|
|
ECCODES_SAMPLES_PATH=${samp_dir}
|
|
|
|
export ECCODES_SAMPLES_PATH
|
2020-01-16 14:40:06 +00:00
|
|
|
|
|
|
|
if [ $HAVE_MEMFS -eq 1 ]; then
|
|
|
|
unset ECCODES_DEFINITION_PATH
|
|
|
|
fi
|