Skip to content

Commit 8623f3e

Browse files
committed
Fixing build issues on Linux / OSX
1 parent d251e72 commit 8623f3e

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

src/Lua/arrayfire/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ FILE(GLOB template_src
3434
"template/*.cpp")
3535

3636
SOURCE_GROUP(template FILES ${template_src})
37+
ADD_DEFINITIONS(-DLUA_COMPAT_MODULE)
3738

3839
# OS Definitions
3940
IF(UNIX)
4041
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread -Wno-comment")
4142
ADD_DEFINITIONS(-Wall -std=c++11 -fvisibility=hidden)
4243
ELSE(${UNIX}) #Windows
43-
ADD_DEFINITIONS(-DAFDLL)
4444
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
4545
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
4646
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /bigobj")

src/Lua/arrayfire/lua_compat.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,5 @@ extern "C" {
44
}
55

66
#if LUA_VERSION_NUM > 501
7-
87
#define lua_objlen(L,i) lua_rawlen(L, (i))
9-
10-
#define luaL_register(L, n, l) do { \
11-
lua_getglobal(L, n); \
12-
if (lua_isnil(L, -1)) { \
13-
lua_pop(L, 1); \
14-
lua_newtable(L); \
15-
} \
16-
luaL_setfuncs(L, l, 0); \
17-
lua_setglobal(L, n); \
18-
}while(0)
19-
208
#endif

0 commit comments

Comments
 (0)