Added option do disable WINPR_ASSERT

This commit is contained in:
akallabeth 2021-06-10 08:57:40 +02:00 committed by akallabeth
parent d36d94766e
commit 3a75228242
2 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,12 @@ project(WinPR C)
set(CMAKE_COLOR_MAKEFILE ON)
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
if (WITH_VERBOSE_WINPR_ASSERT)
add_definitions(-DWITH_VERBOSE_WINPR_ASSERT)
endif()
if(FREERDP_VERSION)
set(FREERDP_BUILD 1)
endif()

View File

@ -26,6 +26,7 @@
#include <winpr/wtypes.h>
#include <winpr/wlog.h>
#if WITH_VERBOSE_WINPR_ASSERT
#define WINPR_ASSERT(cond) \
do \
{ \
@ -36,6 +37,12 @@
abort(); \
} \
} while (0)
#else
#define WINPR_ASSERT(cond) \
do \
{ \
} while (0)
#endif
#ifdef __cplusplus
extern "C"