Fail awesome compilation for Lua5.4 or newer (#3324)
Awesome doesn't support these versions. Preventing the project from compiling with it saves the users some very frustrating and hard to debug bugs. The cmake version check is redundant with the version check in luaa.h. Nevertheless, adding it allows to fail the project build sooner and provides better user experience. Fixes: #3324 Signed-off-by: Shay Agroskin <agrosshay@gmail.com>
This commit is contained in:
parent
fda950d186
commit
3f4b1bd0cc
|
@ -71,6 +71,13 @@ if (NOT LUA_FOUND)
|
|||
"You might want to hint it using the LUA_DIR environment variable, "
|
||||
"or set the LUA_INCLUDE_DIR / LUA_LIBRARY CMake variables.")
|
||||
endif()
|
||||
|
||||
set(LUA_FULL_VERSION "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
|
||||
if(LUA_FULL_VERSION VERSION_EQUAL 5.4.0 OR LUA_FULL_VERSION VERSION_GREATER 5.4.0 )
|
||||
message(FATAL_ERROR "Awesome doesn't support Lua versions newer than 5.3, please refer to"
|
||||
"https://awesomewm.org/apidoc/documentation/10-building-and-testing.md.html#Building")
|
||||
endif()
|
||||
|
||||
# }}}
|
||||
|
||||
# {{{ Check if documentation can be build
|
||||
|
|
4
luaa.h
4
luaa.h
|
@ -31,6 +31,10 @@
|
|||
#include "common/lualib.h"
|
||||
#include "common/luaclass.h"
|
||||
|
||||
#if LUA_VERSION_NUM > 503
|
||||
print("Awesome doesn't support Lua versions newer than 5.3, please refer to https://awesomewm.org/apidoc/documentation/10-building-and-testing.md.html#Building")
|
||||
#endif
|
||||
|
||||
#define luaA_deprecate(L, repl) \
|
||||
do { \
|
||||
luaA_warn(L, "%s: This function is deprecated and will be removed, see %s", \
|
||||
|
|
Loading…
Reference in New Issue