Relocated a check for mremap so that MMAP support can be properly enabled via cmake.

This commit is contained in:
Ward Fisher 2015-04-22 09:59:39 -06:00
parent 218bd4a259
commit 23e4079480

View File

@ -286,6 +286,7 @@ OPTION(BUILD_UTILITIES "Build ncgen, ncgen3, ncdump." ON)
# Option to use MMAP
OPTION(ENABLE_MMAP "Use MMAP." OFF)
IF(ENABLE_MMAP)
CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
IF(NOT HAVE_MREMAP)
MESSAGE(WARNING "mremap not found: disabling MMAP support.")
SET(ENABLE_MMAP OFF)
@ -974,7 +975,6 @@ CHECK_FUNCTION_EXISTS(MPI_Comm_f2C HAVE_MPI_COMM_F2C)
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE)
CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF)
CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
CHECK_FUNCTION_EXISTS(_filelengthi64 HAVE_FILE_LENGTH_I64)