diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 796aa6cfc..54753d7ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -127,9 +127,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${LUA_INCLUDE_DIR}") if ("${HAS_LUA_NEWSTATE}$" MATCHES "TRUE") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_USE_LUA_NEWSTATE") endif() -if ("${HAS_LUA_OBJLEN}$" MATCHES "TRUE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_USE_LUA_OBJLEN") -endif() include_directories(${LEAN_SOURCE_DIR}) diff --git a/src/cmake/Modules/CheckLuaObjlen.cc b/src/cmake/Modules/CheckLuaObjlen.cc deleted file mode 100644 index abb4bd69d..000000000 --- a/src/cmake/Modules/CheckLuaObjlen.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright (c) 2013 Microsoft Corporation. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. - -Author: Leonardo de Moura -*/ -#include -#include -#include - -// Little program for checking whether lua_objlen is available -int main() { - lua_State * L; - L = luaL_newstate(); - lua_newtable(L); - if (lua_objlen(L, -1) == 0) - return 0; - else - return 1; -} diff --git a/src/cmake/Modules/FindLua.cmake b/src/cmake/Modules/FindLua.cmake index 93f4a1af0..62448fc08 100644 --- a/src/cmake/Modules/FindLua.cmake +++ b/src/cmake/Modules/FindLua.cmake @@ -133,18 +133,5 @@ if (LUA_FOUND) else() message(STATUS "lua_newstate is not supported by your Lua engine, Lean will not be able to track memory consumed by the Lua engine") endif() - - try_run(LUA_CHECK2 LUA_CHECK_BUILD2 - ${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp - ${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaObjlen.cc - CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${LUA_INCLUDE_DIR} - -DLINK_LIBRARIES=${LUA_LIBRARIES} - RUN_OUTPUT_VARIABLE LUA_TRY_OUT) - if ("${LUA_CHECK2}" MATCHES "0" AND "${LUA_CHECK_BUILD2}$" MATCHES "TRUE") - message(STATUS "lua_objlen found") - set(HAS_LUA_OBJLEN TRUE) - else() - message(STATUS "lua_objlen is not available, using lua_rawlen instead") - endif() endif() endif ()