feat(lua): allow Lean to be compiled with Lua 5.1 and LuaJit

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-11-03 12:40:44 -08:00
parent df7dbe17b5
commit 9884c056ce
2 changed files with 6 additions and 5 deletions

View file

@ -121,13 +121,13 @@ if(NOT "${TCMALLOC_FOUND}" AND "${TRACK_MEMORY_USAGE}" MATCHES "ON")
endif()
endif()
find_package(Lua 5.2)
find_package(Lua)
if ("${LUA_FOUND}" MATCHES "TRUE")
message(STATUS "Using Lua 5.2 script language")
message(STATUS "Using Lua script language")
set(EXTRA_LIBS ${EXTRA_LIBS} ${LUA_LIBRARIES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${LUA_INCLUDE_DIR} -D LEAN_USE_LUA")
else()
message(WARNING "FAILED to find Lua 5.2 script language, it will not be available")
message(WARNING "FAILED to find Lua script language, it will not be available")
endif()
include_directories(${LEAN_SOURCE_DIR})

View file

@ -5,7 +5,8 @@ print(a/3)
print(b == c)
print(a < b)
print(b < a)
print(10 < b)
print(10 <= b)
print(b == mpz(10))
print(mpz(10) < b)
print(mpz(10) <= b)
print(a)
print(b)