From b2f3ffe3081a3cd49c0536257aab86b82b022cae Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 12 Feb 2015 16:13:14 +1000 Subject: Enable LUA_USE_POSIX if possible in bundled Lua Fixes warning: src/lua/src/loslib.c:60: Warning: the use of `tmpnam' is dangerous, better use `mkstemp' --- src/lua/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lua/CMakeLists.txt') diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt index 36e271889..4bfe318ee 100644 --- a/src/lua/CMakeLists.txt +++ b/src/lua/CMakeLists.txt @@ -47,10 +47,6 @@ else() endif() mark_as_advanced(LUA_USE_DLOPEN) -if(DEFAULT_POSIX) -else() -endif() - if(DEFAULT_ANSI) option(LUA_ANSI "Disable non-ansi features." ON) else() @@ -87,6 +83,10 @@ if(LUA_USE_DLOPEN) endif(NOT APPLE) endif(LUA_USE_DLOPEN) +if(DEFAULT_POSIX) + set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_USE_POSIX") +endif(DEFAULT_POSIX) + if(LUA_ANSI) set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_ANSI") endif(LUA_ANSI) -- cgit v1.2.3