From 3fbd67460e1c4c38a79d00f09bf3113a39abbeca Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 20 Aug 2016 03:22:24 +0200 Subject: CMake: Add Large File Support This module should cover all sorts of large file supports, as long as they either support the getconf LFS_CFLAGS command; or the _FILE_OFFSET_BITS=64 or _LARGE_FILES macros. Closes: #834767 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ced68285d..b63cfe0e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,12 @@ include(GNUInstallDirs) include(TestBigEndian) find_package(Threads) find_package(PkgConfig) +find_package(LFS REQUIRED) + +# Add large file support +add_compile_options(${LFS_COMPILE_OPTIONS}) +add_definitions(${LFS_DEFINITIONS}) +link_libraries(${LFS_LIBRARIES}) # Set compiler flags set(CMAKE_CXX_STANDARD 11) -- cgit v1.2.3