From 831b531895d9a4c0735eaff727acbc28f4e4b412 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 22 Feb 2017 15:22:22 +0100 Subject: MDEV-10788 Not able to compile source with -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Debug It's too plainful to require to be included first for third-party storage engines. And anyway, some source files might not include at all, so there is no guarantee that all parts of the binary will see identical definitions of system structures (e.g. struct stat). Define _FILE_OFFSET_BITS on the compiler's command line instead. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab8870ffb8..6cf2ccb175f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,6 +341,9 @@ INCLUDE(configure.cmake) # Common defines and includes ADD_DEFINITIONS(-DHAVE_CONFIG_H) +IF(_FILE_OFFSET_BITS) + ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS}) +ENDIF() INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include) # Add bundled or system zlib. -- cgit v1.2.1