mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-31 17:50:26 +08:00
Updated open name for relaxed coordinate bounds.
This commit is contained in:
parent
908f787b64
commit
a0bee2e80f
@ -1026,8 +1026,8 @@ ENDIF()
|
||||
|
||||
# Options to use a more relaxed coordinate argument boundary check
|
||||
SET(STATUS_RELAX_COORD_BOUND "OFF")
|
||||
OPTION(ENABLE_RELAX_COORD_BOUND "Enable a more relaxed boundary error check NC_EINVALCOORDS to allow coordinate start argument equal to dimension size when argument count is zero." OFF)
|
||||
IF(ENABLE_RELAX_COORD_BOUND)
|
||||
OPTION(ENABLE_ZERO_LENGTH_COORD_BOUND "Enable a more relaxed boundary error check NC_EINVALCOORDS to allow coordinate start argument equal to dimension size when argument count is zero." OFF)
|
||||
IF(ENABLE_ZERO_LENGTH_COORD_BOUND)
|
||||
SET(STATUS_RELAX_COORD_BOUND "ON")
|
||||
ENDIF()
|
||||
|
||||
|
14
configure.ac
14
configure.ac
@ -1093,12 +1093,12 @@ AC_ARG_ENABLE([erange_fill],
|
||||
[enable_erange_fill=${enableval}], [enable_erange_fill=no]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([relax-coord-bound],
|
||||
[AS_HELP_STRING([--enable-relax-coord-bound],
|
||||
AC_ARG_ENABLE([zero-length-coord-bound],
|
||||
[AS_HELP_STRING([--enable-zero-length-coord-bound],
|
||||
[Enable a more relaxed boundary error check NC_EINVALCOORDS
|
||||
to allow coordinate start argument equal to dimension size
|
||||
when argument count is zero. @<:@default: disabled@:>@])],
|
||||
[enable_relax_coord_bound=${enableval}], [enable_relax_coord_bound=no]
|
||||
[enable_zero_length_coord_bound=${enableval}], [enable_zero_length_coord_bound=no]
|
||||
)
|
||||
|
||||
# check PnetCDF's settings on enable_erange_fill and relax_coord_bound
|
||||
@ -1130,7 +1130,7 @@ if test "x$enable_pnetcdf" = xyes; then
|
||||
AC_MSG_CHECKING([if relax-coord-bound is enabled in PnetCDF])
|
||||
relax_coord_bound_pnetcdf=`grep PNETCDF_RELAX_COORD_BOUND ${ac_cv_header_path_pnetcdf_h}`
|
||||
if test "x$relax_coord_bound_pnetcdf" = x; then
|
||||
relax_coord_bound_pnetcdf=no
|
||||
elax_coord_bound_pnetcdf=no
|
||||
else
|
||||
coord_bound_pnetcdf=`echo ${relax_coord_bound_pnetcdf} | cut -d' ' -f3`
|
||||
if test "x$coord_bound_pnetcdf" = x0; then
|
||||
@ -1140,13 +1140,13 @@ if test "x$enable_pnetcdf" = xyes; then
|
||||
fi
|
||||
fi
|
||||
AC_MSG_NOTICE([$relax_coord_bound_pnetcdf])
|
||||
if test "$enable_relax_coord_bound" != "$relax_coord_bound_pnetcdf"; then
|
||||
if test "$enable_zero_length_coord_bound" != "$relax_coord_bound_pnetcdf"; then
|
||||
if test "$relax_coord_bound_pnetcdf" = yes; then
|
||||
AC_MSG_WARN([Enable relax-coord-bound to conform with PnetCDF setting])
|
||||
else
|
||||
AC_MSG_WARN([Disable relax-coord-bound to conform with PnetCDF setting])
|
||||
fi
|
||||
enable_relax_coord_bound=$relax_coord_bound_pnetcdf
|
||||
enable_zero_length_coord_bound=$relax_coord_bound_pnetcdf
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1159,7 +1159,7 @@ if test "x$enable_erange_fill" = xyes ; then
|
||||
fi
|
||||
AC_SUBST(M4FLAGS)
|
||||
|
||||
if test "x$enable_relax_coord_bound" = xyes; then
|
||||
if test "x$enable_zero_length_coord_bound" = xyes; then
|
||||
AC_DEFINE([RELAX_COORD_BOUND], [1], [if true, NC_EINVALCOORDS check is more relaxed])
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user