Skip to content

Commit 6c8db3e

Browse files
committed
cmake: hide POSIX support to ENABLE_LAPI_TESTS
Follows up commit 0508724 ("tests/lapi: add string tests").
1 parent 13503ec commit 6c8db3e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmake/BuildLua.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ macro(build_lua LUA_VERSION)
6262
# with -fPIC".
6363
set(CFLAGS "${CFLAGS} -fPIC")
6464
set(CFLAGS "${CFLAGS} -DLUA_USE_DLOPEN")
65+
# `io.popen()` is not supported by default, it is enabled
66+
# by `LUA_USE_POSIX` flag. Required by a function `random_locale()`.
67+
set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX")
6568
endif()
6669

67-
# `io.popen()` is not supported by default, it is enabled
68-
# by `LUA_USE_POSIX` flag. Required by a function `random_locale()`.
69-
set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX")
70-
7170
include(ExternalProject)
7271

7372
set(LUA_LIBRARY ${PROJECT_BINARY_DIR}/lua-${LUA_VERSION}/source/liblua.a)

0 commit comments

Comments
 (0)