From 0349c06fedfe760554c9fca309b29c1c553c505c Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 4 Dec 2024 14:24:04 -0500 Subject: [PATCH] build: ReAdd NDEBUG define --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3243b76cc..f6f16e725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,14 @@ set(REQUIRED_LIBEI_VERSION 1.3) set(REQUIRED_LIBPORTAL_VERSION 0.8) set(REQUIRED_QT_VERSION 6.7.0) +# Control debug item visibility +# When not set logging is forced to DEBUG and show code locations +# Also exposes a test menu +if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + message(STATUS "Disabling debug build") + add_definitions(-DNDEBUG) +endif() + # Set required macOS SDK if(APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET 12)