From d5c89b18968e9f400183c98493faa5a25f6f07df Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Sun, 8 May 2016 03:06:46 +0100 Subject: cmake: Allow building without Luajit By default Neovim searched a Luajit instalation and linked against the luajit library. In practice Neovim only requires luajit to run the unit tests. All other targets only require lua and the correct lua modules. This commit: 1. Remove the strict dependency on Luajit 2. Makes the unittest target depend on the lua 'ffi' module. If the module is not available the target is not enabled and a message is displayed. --- cmake/LuaHelpers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/LuaHelpers.cmake b/cmake/LuaHelpers.cmake index b1e67e0ca7..32f7e46a57 100644 --- a/cmake/LuaHelpers.cmake +++ b/cmake/LuaHelpers.cmake @@ -8,8 +8,6 @@ function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR) RESULT_VARIABLE module_missing ERROR_QUIET) if(module_missing) - message(STATUS - "[${LUA_PRG_PATH}] The '${MODULE}' lua package is required for building Neovim") set(${RESULT_VAR} False PARENT_SCOPE) else() set(${RESULT_VAR} True PARENT_SCOPE) @@ -29,6 +27,8 @@ function(check_lua_deps LUA_PRG_PATH MODULES RESULT_VAR) foreach(module ${MODULES}) check_lua_module(${LUA_PRG_PATH} ${module} has_module) if(NOT has_module) + message(STATUS + "[${LUA_PRG_PATH}] The '${module}' lua package is required for building Neovim") set(${RESULT_VAR} False PARENT_SCOPE) return() endif() -- cgit