From c3295e014d979c0213b3fb7e4837b5356bc8fdb4 Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 30 Oct 2023 22:40:20 +0200 Subject: Reintroducing Unload functions. Is*Ready functions. GC_UNLOAD setting and check function. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b4b51d..0827e0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ set( CMAKE_C_STANDARD 99 ) # Requires C99 standard option( SHARED "Build using dynamic libraries." off ) option( LUAJIT "Use LuaJIT." off ) +option( GC_UNLOAD "Lua garbage collector unloads objects. If off, object unloading should be handled manually." on ) if( NOT CMAKE_BUILD_TYPE ) SET( CMAKE_BUILD_TYPE Release CACHE STRING @@ -15,6 +16,10 @@ if( NOT CMAKE_BUILD_TYPE ) FORCE ) endif() +if( GC_UNLOAD ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGC_UNLOAD" ) +endif() + file( GLOB SOURCES src/*.c ) include_directories( include ) -- cgit v1.2.3