diff options
author | Chris Robinson <[email protected]> | 2014-08-05 05:05:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-08-05 05:05:05 -0700 |
commit | 951870b18978eab89391f43c3c5b85e0700eb198 (patch) | |
tree | 08b1ed3bd32ac06786d795f4215cd748e0ad2fd3 /CMakeLists.txt | |
parent | bda39c5038e67bdad0c39a3c311136167aad3d15 (diff) |
Enable large file support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index da3f160f..278c70c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ INCLUDE(CheckSymbolExists) INCLUDE(CheckCCompilerFlag) INCLUDE(CheckCSourceCompiles) INCLUDE(CheckTypeSize) +include(CheckFileOffsetBits) SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) @@ -36,6 +37,15 @@ ELSE() SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700") ENDIF() +# Set defines for large file support +CHECK_FILE_OFFSET_BITS() +IF(_FILE_OFFSET_BITS) + ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS}) + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS}") +ENDIF() +ADD_DEFINITIONS(-D_LARGEFILE_SOURCE -D_LARGE_FILES) +SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_LARGEFILE_SOURCE -D_LARGE_FILES") + OPTION(ALSOFT_DLOPEN "Check for the dlopen API for loading optional libs" ON) |