From 119f2c1b4c780bd7ab7df8267d0311fc352a1db6 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Fri, 22 Dec 2023 12:30:10 -0800 Subject: [PATCH] Add support for `cmake -DDEBUG_LEAKS=1` (#230) I want to do a Release build (so that assert is disabled), but still log leaks. This adds the option to enable that through CMake. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d7eaf5..103e9a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,7 +152,7 @@ endif() add_library(qjs ${qjs_sources}) target_compile_definitions(qjs PRIVATE ${qjs_defines}) -if (CMAKE_BUILD_TYPE MATCHES Debug) +if (CMAKE_BUILD_TYPE MATCHES Debug OR DUMP_LEAKS) target_compile_definitions(qjs PRIVATE DUMP_LEAKS )