From 4b00d74d1a99afeb89825607d648d7d656fc5fd0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 14 Apr 2017 10:28:57 +0200 Subject: [PATCH] Allow large files in 32 bit builds try to fix https://lintian.debian.org/tags/binary-file-built-without-LFS-support.html --- CMakeLists.txt | 9 ++++++++- .../libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66251e28f..c3994de90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ################################################################################ diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index 5e12f5fcb..d6e69819b 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -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 ########################################################################