summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-02-25 16:57:49 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-02-25 16:57:49 +0100
commit1a11c2236fa096b8f9618cb4e5ffbf3d5add2787 (patch)
tree6f92ab813112f7223e0e09470abb66dbc4592ab8 /CMakeLists.txt
parent5d2fc5335411bdd05a08a9b062d3441d4308dcaa (diff)
downloadmariadb-git-1a11c2236fa096b8f9618cb4e5ffbf3d5add2787.tar.gz
Bug#43082: mysqld 32 bit cannot use big buffers due to 2GB
usermode address space limit. Fix: use /LARGEADDRESSAWARE link option when linking 32 bit executables
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae069498da1..f66453ef492 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,7 +114,13 @@ IF(MSVC)
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
-
+
+ # Mark 32 bit executables large address aware so they can
+ # use > 2GB address space
+ IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 4)
+
# Disable automatic manifest generation.
STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
${CMAKE_EXE_LINKER_FLAGS})