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.
This commit is contained in:
Nathan Rajlich 2023-12-22 12:30:10 -08:00 committed by GitHub
parent f94fbe2f8a
commit 119f2c1b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
)