From 837049b5534bc3dc6cbe83b136e514fd72602e42 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Wed, 27 Aug 2025 21:52:48 -0700 Subject: Introduce a new define to control LogTrace rather than using _DEBUG Defining `_DEBUG` changes which MSVC runtime library needs to be linked which breaks clients attempting to use the C++ API with `RelWithDebInfo`. To fix this we define a new private `BN_ENABLE_LOG_TRACE` macro and use that within log.cpp where it was previously using `_DEBUG`. Fixes https://github.com/Vector35/binaryninja-api/issues/7288. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a28b964..197897a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,9 +63,7 @@ if(BN_REF_COUNT_DEBUG) endif() if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) - target_compile_definitions(binaryninjaapi PRIVATE _DEBUG) -else() - target_compile_definitions(binaryninjaapi PRIVATE NDEBUG) + target_compile_definitions(binaryninjaapi PRIVATE BN_ENABLE_LOG_TRACE) endif() add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL) -- cgit v1.3.1