Permalink
Browse files

custom-build: added build-specific options to compile LuaJIT

  • Loading branch information...
1 parent eb22947 commit 0ccf65f9a75f1d9edc2d5c70ae382981ebdce238 Pavel Cherenkov committed May 18, 2012
@@ -20,11 +20,16 @@ add_subdirectory(gopt)
macro (luajit_build)
set (luajit_buildoptions BUILDMODE=static)
- set (luajit_buildoptions ${luajit_buildoptions} CCOPT='-I.. -O1')
+ set (luajit_copt ${CCOPT})
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set (luajit_buildoptions ${luajit_buildoptions} CCDEBUG=-ggdb)
+ set (luajit_copt ${luajit_copt} -O1)
set (luajit_buildoptions ${luajit_buildoptions} XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT')
+ else ()
+ set (luajit_copt ${luajit_copt} -O2)
endif()
+ set (luajit_copt ${luajit_copt} -I.. )
+ set (luajit_buildoptions ${luajit_buildoptions} CCOPT="${luajit_copt}")
set (luajit_buildoptions ${luajit_buildoptions} Q='')
if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a

0 comments on commit 0ccf65f

Please sign in to comment.