aboutsummaryrefslogtreecommitdiff
path: root/cmake/LuaHelpers.cmake
Commit message (Collapse)AuthorAge
* build: cmake cleanupdundargoc2023-05-13
| | | | | | | | | | - Simplify error checking when using execute_process. - Set BUILD_SHARED_LIBS to OFF when building dependencies. This is normally not needed, but msgpack interprets an unset BUILD_SHARED_LIBS to build a shared library, which is the opposite of the cmake behavior. - Move function check_lua_module to Util.cmake. - Remove unnecessary code. - Make variable naming more consistent
* refactor(build): include lpeg as a librarybfredl2023-04-27
|
* build: adjust some messages (#9087)Justin M. Keyes2018-10-06
|
* cmake/LuaHelpers.cmake: check_lua_module: use 'lua -l'Daniel Hahler2018-02-22
| | | | | | It only shortens the traceback a bit for when a module is not found though, only removing the "(command line):1: in main chunk" (with lua5.2).
* cmake/LuaHelpers.cmake: check_lua_module: display errorsDaniel Hahler2018-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to figure out what the problem is, e.g. in my case I have lua51-mpack installed to be used with luajit, but it is broken (missing libmpack). With this patch you get: -- Checking Lua interpreter /usr/bin/luajit /usr/bin/luajit: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so': libmpack.so.0: cannot open shared object file: No such file or directory stack traceback: [C]: at 0x55fcf0166fb0 [C]: in function 'require' (command line):1: in main chunk [C]: at 0x55fcf01188a0 -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.1 /usr/bin/lua5.1: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so': libmpack.so.0: cannot open shared object file: No such file or directory stack traceback: [C]: ? [C]: in function 'require' (command line):1: in main chunk [C]: ? -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.2 /usr/bin/lua5.2: (command line):1: module 'mpack' not found: no field package.preload['mpack'] no file '/usr/share/lua/5.2/mpack.lua' no file '/usr/share/lua/5.2/mpack/init.lua' no file '/usr/lib/lua/5.2/mpack.lua' no file '/usr/lib/lua/5.2/mpack/init.lua' no file './mpack.lua' no file '/usr/lib/lua/5.2/mpack.so' no file '/usr/lib/lua/5.2/loadall.so' no file './mpack.so' stack traceback: [C]: in function 'require' (command line):1: in main chunk [C]: in ? -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua /usr/bin/lua: (command line):1: module 'mpack' not found: no field package.preload['mpack'] no file '/usr/share/lua/5.3/mpack.lua' no file '/usr/share/lua/5.3/mpack/init.lua' no file '/usr/lib/lua/5.3/mpack.lua' no file '/usr/lib/lua/5.3/mpack/init.lua' no file './mpack.lua' no file './mpack/init.lua' no file '/usr/lib/lua/5.3/mpack.so' no file '/usr/lib/lua/5.3/loadall.so' no file './mpack.so' stack traceback: [C]: in function 'require' (command line):1: in main chunk [C]: in ? -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim CMake Error at CMakeLists.txt:459 (message): A suitable Lua interpreter was not found. While this makes it more verbose for the expected error case ("module 'mpack' not found"), the behavior before this patch hides too much. This is the old output: -- Checking Lua interpreter /usr/bin/luajit -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.1 -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.2 -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim CMake Error at CMakeLists.txt:459 (message): A suitable Lua interpreter was not found. This is for when the whole configuration runs (i.e. after `make distclean`), afterwards only one Lua interpreter gets checked only.
* cmake: Allow building without LuajitRui Abreu Ferreira2016-05-19
| | | | | | | | | | | | | 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.
* Refactor the lua dependency checking.Rui Abreu Ferreira2014-07-11
This is in preparation for the next step, which is to find a suitable lua interpreter, rather than just erroring when an interpreter is found but doesn't have the necessary dependencies. Helped-by: John Szakmeister <john@szakmeister.net>