mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r19776] Corrected handling of largefile and linux_lfs handling.
Synched cmake version of H5pubconf.h.in Added another variation of H5detect warning to ignore list.
This commit is contained in:
parent
e9670c0382
commit
e99c8dd6bc
@ -4,6 +4,7 @@ SET (CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
${CTEST_CUSTOM_WARNING_EXCEPTION}
|
||||
"H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090"
|
||||
"H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument"
|
||||
"H5detect.c[0-9 \t:]*warning:[ \t]*passing argument"
|
||||
"H5Tconv.c[0-9]+.[ \t]*:[ \t]*warning:[ \t]*comparison is always false due to limited range of data type"
|
||||
"testhdf5.h.[0-9]+.[ \t]*:[ \t]*warning C4005"
|
||||
"H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
|
||||
|
@ -282,22 +282,21 @@ ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
|
||||
# Check for large file support
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The linux-lfs option is deprecated.
|
||||
SET (LINUX_LFS 0)
|
||||
|
||||
SET (HDF5_EXTRA_FLAGS)
|
||||
IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
|
||||
# Linux Specific flags
|
||||
ADD_DEFINITIONS (-D_POSIX_SOURCE -D_BSD_SOURCE)
|
||||
SET (HDF5_EXTRA_FLAGS -D_POSIX_SOURCE -D_BSD_SOURCE)
|
||||
OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
|
||||
IF (HDF5_ENABLE_LARGE_FILE)
|
||||
SET (LARGEFILE 1)
|
||||
SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
|
||||
SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
|
||||
SET (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
|
||||
ENDIF (HDF5_ENABLE_LARGE_FILE)
|
||||
SET (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF5_EXTRA_FLAGS})
|
||||
ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
|
||||
IF (LINUX_LFS)
|
||||
SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
|
||||
SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
|
||||
ENDIF (LINUX_LFS)
|
||||
|
||||
ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -419,6 +418,15 @@ CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64)
|
||||
CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# sigsetjmp is special; may actually be a macro
|
||||
IF (NOT H5_HAVE_SIGSETJMP)
|
||||
IF (H5_HAVE_SETJMP_H)
|
||||
CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" H5_HAVE_MACRO_SIGSETJMP)
|
||||
IF (H5_HAVE_MACRO_SIGSETJMP)
|
||||
SET (H5_HAVE_SIGSETJMP 1)
|
||||
ENDIF (H5_HAVE_MACRO_SIGSETJMP)
|
||||
ENDIF (H5_HAVE_SETJMP_H)
|
||||
ENDIF (NOT H5_HAVE_SIGSETJMP)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Since gettimeofday is not defined any where standard, lets look in all the
|
||||
@ -506,11 +514,11 @@ MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
|
||||
ENDIF ("${def}")
|
||||
ENDFOREACH (def)
|
||||
|
||||
IF (LINUX_LFS)
|
||||
IF (LARGEFILE)
|
||||
SET (MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
|
||||
)
|
||||
ENDIF (LINUX_LFS)
|
||||
ENDIF (LARGEFILE)
|
||||
|
||||
# (STATUS "Performing ${OTHER_TEST}")
|
||||
TRY_COMPILE (${OTHER_TEST}
|
||||
|
@ -291,6 +291,9 @@
|
||||
/* Define to 1 if you have the `rand_r' function. */
|
||||
#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
|
||||
|
||||
/* Define to 1 if you have the `sigsetjmp' function. */
|
||||
#cmakedefine H5_HAVE_SETJMP_H @H5_HAVE_SETJMP@
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#cmakedefine H5_HAVE_SETJMP_H @H5_HAVE_SETJMP_H@
|
||||
|
||||
@ -306,6 +309,12 @@
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#cmakedefine H5_HAVE_SIGNAL @H5_HAVE_SIGNAL@
|
||||
|
||||
/* Define to 1 if you have the `sigprocmask' function. */
|
||||
#cmakedefine H5_HAVE_SIGPROCMASK @H5_HAVE_SIGPROCMASK@
|
||||
|
||||
/* Define to 1 if you have the `sigsetjmp' function. */
|
||||
#cmakedefine H5_HAVE_SIGSETJMP @H5_HAVE_SIGSETJMP@
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#cmakedefine H5_HAVE_SNPRINTF @H5_HAVE_SNPRINTF@
|
||||
|
||||
@ -345,7 +354,7 @@
|
||||
/* Define if `struct timezone' is defined */
|
||||
#cmakedefine H5_HAVE_STRUCT_TIMEZONE @H5_HAVE_STRUCT_TIMEZONE@
|
||||
|
||||
/* Define to 1 if `struct tm' is a member of `tm_zone'. */
|
||||
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
|
||||
#cmakedefine H5_HAVE_STRUCT_TM_TM_ZONE @H5_HAVE_STRUCT_TM_TM_ZONE@
|
||||
|
||||
/* Define if `struct videoconfig' is defined */
|
||||
@ -470,6 +479,10 @@
|
||||
values correctly. */
|
||||
#cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@
|
||||
|
||||
/* Define if your system converts long double to (unsigned) long values with
|
||||
special algorithm. */
|
||||
#cmakedefine H5_LDOUBLE_TO_LONG_SPECIAL @H5_LDOUBLE_TO_LONG_SPECIAL@
|
||||
|
||||
/* Define if your system can convert long double to unsigned int values
|
||||
correctly. */
|
||||
#cmakedefine H5_LDOUBLE_TO_UINT_ACCURATE @H5_LDOUBLE_TO_UINT_ACCURATE@
|
||||
@ -481,6 +494,10 @@
|
||||
values correctly. */
|
||||
#cmakedefine H5_LLONG_TO_LDOUBLE_CORRECT @H5_LLONG_TO_LDOUBLE_CORRECT@
|
||||
|
||||
/* Define if your system can convert (unsigned) long to long double values
|
||||
with special algorithm. */
|
||||
#cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@
|
||||
@ -620,6 +637,9 @@
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define H5_SIZEOF_OFF_T @H5_SIZEOF_OFF_T@
|
||||
|
||||
/* The size of `ptrdiff_t', as computed by sizeof. */
|
||||
#define H5_SIZEOF_PTRDIFF_T @H5_SIZEOF_PTRDIFF_T@
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#define H5_SIZEOF_SHORT @H5_SIZEOF_SHORT@
|
||||
|
||||
@ -730,6 +750,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#cmakedefine _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#cmakedefine _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#cmakedefine H5_const
|
||||
|
||||
@ -742,6 +768,9 @@
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
#cmakedefine H5_off_t
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#cmakedefine H5_ptrdiff_t
|
||||
|
||||
/* Define to `unsigned long' if <sys/types.h> does not define. */
|
||||
#cmakedefine H5_size_t
|
||||
|
||||
|
@ -65,4 +65,4 @@ Clear file buffers before write: @CLEARFILEBUF@
|
||||
GPFS: @GPFS@
|
||||
Strict File Format Checks: @STRICT_FORMAT_CHECKS@
|
||||
Optimization Instrumentation: @INSTRUMENT@
|
||||
Linux Large File Support (LFS): @LINUX_LFS@
|
||||
Large File Support (LFS): @LARGEFILE@
|
||||
|
Loading…
Reference in New Issue
Block a user