From a1a6374966e66581ef328f2dfbc248cc336ff101 Mon Sep 17 00:00:00 2001 From: Daniel Trugman Date: Sun, 19 May 2024 09:26:56 +0100 Subject: [PATCH] REVERT: 32-bit compilation flag --- CMakeLists.txt | 3 +++ README.md | 1 + 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 294ea22..2e43340 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,9 @@ option (pfs_BUILD_TESTS "Build tests" ON) add_compile_options (-std=c++11 -Wall -Wextra -pedantic -Werror) +# Ensure that off_t is 64-bits even on 32-bit systems +add_compile_options (-D_FILE_OFFSET_BITS=64) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) diff --git a/README.md b/README.md index a20fbfd..1a8d86c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Run `cmake . && make` ### Currently supported CMake configuration flags: - `CMAKE_BUILD_TYPE=`: Standard CMake flags to control build type (DEFAULT: Debug) +- `pfs_BUILD_32BIT=`: ON to compile a 32-bit binary. OFF to compile using the default configuration of your compiler (DEFAULT: `OFF`)) - `pfs_BUILD_SHARED_LIBS=`: ON to compile a shared library. OFF to compile a static library (DEFAULT: Inherit `BUILD_SHARE_LIBS`, which is `OFF` by default)) - `pfs_BUILD_ASAN=`: ON to enable address sanitizer (DEFAULT: `OFF`) - `pfs_BUILD_SAMPLES=`: ON to build the sample programs (DEFAULT: `ON`)