Add missing linker flags required for LuaJIT on 64-bit Mac OS X.

This was brought up in #1294.
This commit is contained in:
John Szakmeister 2014-10-17 06:50:13 -04:00
parent 7e17eb49b0
commit 5e65400c6f

View File

@ -69,6 +69,16 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
# Required for luajit.
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
set(CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -image_base 100000000")
set(CMAKE_MODULE_LINKER_FLAGS
"${CMAKE_MODULE_LINKER_FLAGS} -image_base 100000000")
endif()
option(USE_GCOV "Enable gcov support" OFF)
if(USE_GCOV)