From e40210391102bd82adb820959f57675a9d89346d Mon Sep 17 00:00:00 2001 From: Shadman <13149513+shadmansaleh@users.noreply.github.com> Date: Tue, 4 Jan 2022 01:44:30 +0600 Subject: [PATCH] chore(build): compile lua only on release builds (#16859) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f1829cf55..0c43c5c494 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,7 +543,11 @@ endif() message(STATUS "Using Lua interpreter: ${LUA_PRG}") -option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" ON) +if(DEBUG) + option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" OFF) +else() + option(COMPILE_LUA "Pre-compile Lua sources into bytecode (for sources that are included in the binary)" ON) +endif() if(COMPILE_LUA AND NOT WIN32) if(PREFER_LUA)