Allow large files in 32 bit builds

try to fix
https://lintian.debian.org/tags/binary-file-built-without-LFS-support.html
This commit is contained in:
Carles Fernandez 2017-04-14 10:28:57 +02:00
parent b7fba936ef
commit 4b00d74d1a
2 changed files with 16 additions and 1 deletions

View File

@ -271,6 +271,14 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
# Append -O2 optimization flag for Debug builds
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif(UNIX)
################################################################################
@ -331,7 +339,6 @@ if(OS_IS_LINUX)
endif(OS_IS_LINUX)
################################################################################
# Googletest - https://github.com/google/googletest
################################################################################

View File

@ -76,6 +76,14 @@ if(MSVC)
add_compile_options(/wo4838)
endif(MSVC)
# allow 'large' files in 32 bit builds
if(UNIX)
add_definitions( -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
)
endif(UNIX)
########################################################################
# Dependencies setup
########################################################################