chore(cmake/Modules/FindLua): disable TRY_RUN in cross-compilation.

This commit is contained in:
Soonho Kong 2013-11-08 18:04:55 -05:00
parent bbab454b6c
commit d4dbc18404

View file

@ -118,6 +118,9 @@ MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_
# Print out version number
if (LUA_FOUND)
if (CMAKE_CROSSCOMPILING)
message(STATUS "Cross-compiling: can't find whether lua_objlen or lua_newstate is available.")
else()
try_run(LUA_CHECK LUA_CHECK_BUILD
${LEAN_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${LEAN_SOURCE_DIR}/cmake/Modules/CheckLuaNewstate.cc
@ -143,5 +146,5 @@ if (LUA_FOUND)
else()
message(STATUS "lua_objlen is not available, using lua_rawlen instead")
endif()
endif()
endif ()