From 03041181161690c0e256bdd5bfd0b2cfcc97289a Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Thu, 9 Oct 2025 14:54:42 +0300 Subject: [PATCH] cmake: hide POSIX support to ENABLE_LAPI_TESTS Follows up commit 0508724910b2 ("tests/lapi: add string tests"). --- cmake/BuildLua.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/BuildLua.cmake b/cmake/BuildLua.cmake index 0882104..b9e27c5 100644 --- a/cmake/BuildLua.cmake +++ b/cmake/BuildLua.cmake @@ -62,12 +62,11 @@ macro(build_lua LUA_VERSION) # with -fPIC". set(CFLAGS "${CFLAGS} -fPIC") set(CFLAGS "${CFLAGS} -DLUA_USE_DLOPEN") + # `io.popen()` is not supported by default, it is enabled + # by `LUA_USE_POSIX` flag. Required by a function `random_locale()`. + set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX") endif() - # `io.popen()` is not supported by default, it is enabled - # by `LUA_USE_POSIX` flag. Required by a function `random_locale()`. - set(CFLAGS "${CFLAGS} -DLUA_USE_POSIX") - include(ExternalProject) set(LUA_LIBRARY ${PROJECT_BINARY_DIR}/lua-${LUA_VERSION}/source/liblua.a)