diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-10-20 19:09:19 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-10-20 19:09:19 (GMT) |
commit | 66752c48b5c228b8643d1f0235f59d31ecf8f348 (patch) | |
tree | 270da01b9732c108c657ac54fe4bf78cea6aa8b7 /config | |
parent | 705d92a7966e8697c8ddc5824733e95e2e56c031 (diff) | |
download | hdf5-66752c48b5c228b8643d1f0235f59d31ecf8f348.zip hdf5-66752c48b5c228b8643d1f0235f59d31ecf8f348.tar.gz hdf5-66752c48b5c228b8643d1f0235f59d31ecf8f348.tar.bz2 |
[svn-r21623] Update LFS test
Tested: local linux
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0d0f16a..be03e52 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -295,16 +295,43 @@ ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) SET (LINUX_LFS 0) SET (HDF5_EXTRA_FLAGS) -IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.") +#IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.") +IF (NOT WINDOWS) # Linux Specific flags 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 ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + SET (msg "Performing TEST_LFS_WORKS") + TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE + ${HDF5_BINARY_DIR}/CMake + ${HDF5_RESOURCES_DIR}/HDF5Tests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS + OUTPUT_VARIABLE OUTPUT + ) + IF (TEST_LFS_WORKS_COMPILE) + IF (TEST_LFS_WORKS_RUN MATCHES 0) + SET (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) + SET (LARGEFILE 1) + SET (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + MESSAGE (STATUS "${msg}... yes") + ELSE (TEST_LFS_WORKS_RUN MATCHES 0) + SET (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... no") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" + ) + ENDIF (TEST_LFS_WORKS_RUN MATCHES 0) + ELSE (TEST_LFS_WORKS_COMPILE ) + SET (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... no") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n" + ) + ENDIF (TEST_LFS_WORKS_COMPILE) 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])\\.") +ENDIF (NOT WINDOWS) +#ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.") ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS}) |