Skip to content
Snippets Groups Projects
Commit 0ccf65f9 authored by Pavel Cherenkov's avatar Pavel Cherenkov
Browse files

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

parent eb229479
No related branches found
No related tags found
No related merge requests found
...@@ -20,11 +20,16 @@ add_subdirectory(gopt) ...@@ -20,11 +20,16 @@ add_subdirectory(gopt)
macro (luajit_build) macro (luajit_build)
set (luajit_buildoptions BUILDMODE=static) set (luajit_buildoptions BUILDMODE=static)
set (luajit_buildoptions ${luajit_buildoptions} CCOPT='-I.. -O1') set (luajit_copt ${CCOPT})
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set (luajit_buildoptions ${luajit_buildoptions} CCDEBUG=-ggdb) 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') set (luajit_buildoptions ${luajit_buildoptions} XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT')
else ()
set (luajit_copt ${luajit_copt} -O2)
endif() endif()
set (luajit_copt ${luajit_copt} -I.. )
set (luajit_buildoptions ${luajit_buildoptions} CCOPT="${luajit_copt}")
set (luajit_buildoptions ${luajit_buildoptions} Q='') set (luajit_buildoptions ${luajit_buildoptions} Q='')
if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/luajit/src/libluajit.a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment