mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
Merge #8044 'build: improve Lua module checks'
This commit is contained in:
commit
8c8cf46c71
@ -4,9 +4,8 @@
|
|||||||
|
|
||||||
# Check if a module is available in Lua
|
# Check if a module is available in Lua
|
||||||
function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR)
|
function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR)
|
||||||
execute_process(COMMAND ${LUA_PRG_PATH} -e "require('${MODULE}')"
|
execute_process(COMMAND ${LUA_PRG_PATH} -l "${MODULE}" -e ""
|
||||||
RESULT_VARIABLE module_missing
|
RESULT_VARIABLE module_missing)
|
||||||
ERROR_QUIET)
|
|
||||||
if(module_missing)
|
if(module_missing)
|
||||||
set(${RESULT_VAR} False PARENT_SCOPE)
|
set(${RESULT_VAR} False PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
|
Loading…
Reference in New Issue
Block a user