mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r19001] Corrected large file option
This commit is contained in:
parent
7d5d8a45be
commit
84f6de6f28
@ -78,15 +78,17 @@ IF (HDF5_WANT_DCONV_EXCEPTION)
|
||||
ENDIF (HDF5_WANT_DCONV_EXCEPTION)
|
||||
|
||||
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)
|
||||
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})
|
||||
ENDIF (HDF5_ENABLE_LARGE_FILE)
|
||||
ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
|
||||
SET (HDF5_EXTRA_FLAGS)
|
||||
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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user