From d3c6e31bf3c72eaf09e437676a66e6cd36885f41 Mon Sep 17 00:00:00 2001 From: implicitfield <114500360+implicitfield@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:56:23 +0400 Subject: [PATCH] CMake: Build lagom with -D_FILE_OFFSET_BITS=64 on Linux 32-bit glibc limits off_t to 32 bits without this definition, which makes working with large files rather difficult. --- Meta/CMake/lagom_compile_options.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Meta/CMake/lagom_compile_options.cmake b/Meta/CMake/lagom_compile_options.cmake index 2f7ba5213e..cad5e56947 100644 --- a/Meta/CMake/lagom_compile_options.cmake +++ b/Meta/CMake/lagom_compile_options.cmake @@ -8,6 +8,10 @@ if (NOT WIN32) add_compile_options(-fPIC) endif() +if (LINUX) + add_compile_options(-D_FILE_OFFSET_BITS=64) +endif() + if (CMAKE_BUILD_TYPE STREQUAL "Debug") add_compile_options(-ggdb3) add_compile_options(-Og)